diff --git a/base/classes/webform/TForm.class.php b/base/classes/webform/TForm.class.php index 86a3322d..5d246921 100644 --- a/base/classes/webform/TForm.class.php +++ b/base/classes/webform/TForm.class.php @@ -2126,7 +2126,9 @@ public function setAutoComplete( $strFieldName } } - $strExtraParams = str_replace( array( '{', '}', ':"$', ').value"', '"jQuery("#', '\").get', '"{', '}"' ), array( '', '', ':$', ').value', 'jQuery("#', '").get', '{', '}' ), stripcslashes( json_encode( $aTemp ) ) ); + $strExtraParamsSearch = array( '{', '}', ':"$', ').value"', '"jQuery("#', '\").get', '"{', '}"' ); + $strExtraParamsReplace = array( '', '', ':$', ').value', 'jQuery("#', '").get', '{', '}' ); + $strExtraParams = str_replace( $strExtraParamsSearch, $strExtraParamsReplace, stripcslashes( json_encode( $aTemp ) ) ); $this->addJavascript( 'jQuery("#' . $strFieldName . '").autocomplete(' . $strUrl . '&ajax=1", { ajax:1, delay:' . $intDelay . ', minChars:' . $intMinChars .' ,matchSubset:1, matchContains:1, cacheLength:10, onItemSelect:fwAutoCompleteSelectItem'