]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 657194: Use YUI's escapeHTML() instead of our custom one
authorReed Loden <reed@reedloden.com>
Tue, 7 Jun 2011 20:11:27 +0000 (22:11 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 7 Jun 2011 20:11:27 +0000 (22:11 +0200)
r=mkanat a=LpSolit

js/field.js

index 949c210a30b87be1756d73e629e368b92571f6bc..1a3bc3efd4fdd56bbdd59be55e886200c3206868 100644 (file)
@@ -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 */