summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/field.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/js/field.js b/js/field.js
index 949c210a3..1a3bc3efd 100644
--- a/js/field.js
+++ b/js/field.js
@@ -669,13 +669,6 @@ function browserCanHideOptions(aSelect) {
/* (end) option hiding code */
-// A convenience function to sanitize raw text for harmful HTML before outputting
-function _escapeHTML(text) {
- return text.replace(/&/g, '&').
- replace(/</g, '&lt;').
- replace(/>/g, '&gt;');
-}
-
/**
* The Autoselect
*/
@@ -701,7 +694,8 @@ YAHOO.bugzilla.userAutocomplete = {
return stringified;
},
resultListFormat : function(oResultData, enteredText, sResultMatch) {
- return ( _escapeHTML(oResultData.real_name) + " (" + _escapeHTML(oResultData.name) + ")");
+ return ( YAHOO.lang.escapeHTML(oResultData.real_name) + " ("
+ + YAHOO.lang.escapeHTML(oResultData.name) + ")");
},
debug_helper : function ( ){
/* used to help debug any errors that might happen */