summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReed Loden <reed@reedloden.com>2011-06-07 22:11:27 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2011-06-07 22:11:27 +0200
commita4e3261b663c2087030aa5afca5c07580689c64f (patch)
tree10344059c9a5f6e7c41be4d75b07ada1a953c990
parent54e2e43559c57f294ba48c92d7b9792d3a97848e (diff)
downloadbugzilla-a4e3261b663c2087030aa5afca5c07580689c64f.tar.gz
bugzilla-a4e3261b663c2087030aa5afca5c07580689c64f.tar.xz
Bug 657194: Use YUI's escapeHTML() instead of our custom one
r=mkanat a=LpSolit
-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, '&amp;').
- 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 */