Permalink
Browse files

switch to Y.Escape

  • Loading branch information...
1 parent 1bc9305 commit aa1e7699be842531bb5d35c2dcf228c9fb7e4f2c John Lindal committed Apr 14, 2012
@@ -2172,16 +2172,7 @@ Y.extend(BulkEditor, Y.Widget,
function cleanHTML(s)
{
- if (!s)
- {
- return '';
- }
-
- return s.toString()
- .replace(/<\/?script>/ig, '')
- .replace(/&/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
+ return (s ? Y.Escape.html(s) : '');
}
BulkEditor.error_msg_markup = Y.Lang.sub('<div class="{c}"></div>',
@@ -2641,4 +2632,4 @@ Y.extend(HTMLTableBulkEditor, BulkEditor,
Y.HTMLTableBulkEditor = HTMLTableBulkEditor;
-}, '@VERSION@' ,{requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-object-extras'], optional:['datasource','dataschema','gallery-paginator'], skinnable:true});
+}, '@VERSION@' ,{requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-funcprog','escape'], optional:['datasource','dataschema','gallery-paginator'], skinnable:true});

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2170,16 +2170,7 @@ Y.extend(BulkEditor, Y.Widget,
function cleanHTML(s)
{
- if (!s)
- {
- return '';
- }
-
- return s.toString()
- .replace(/<\/?script>/ig, '')
- .replace(/&/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
+ return (s ? Y.Escape.html(s) : '');
}
BulkEditor.error_msg_markup = Y.Lang.sub('<div class="{c}"></div>',
@@ -2638,4 +2629,4 @@ Y.extend(HTMLTableBulkEditor, BulkEditor,
Y.HTMLTableBulkEditor = HTMLTableBulkEditor;
-}, '@VERSION@' ,{requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-object-extras'], optional:['datasource','dataschema','gallery-paginator'], skinnable:true});
+}, '@VERSION@' ,{requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-funcprog','escape'], optional:['datasource','dataschema','gallery-paginator'], skinnable:true});
@@ -1,7 +1,7 @@
builddir=../../../builder/componentbuild
component=gallery-bulkedit
component.jsfiles=BulkEditDataSource.js,BulkEditor.js,HTMLTableBulkEditor.js
-component.requires=widget,datasource-local,gallery-busyoverlay,gallery-formmgr-css-validation,gallery-node-optimizations,gallery-scrollintoview,array-extras,gallery-object-extras
+component.requires=widget,datasource-local,gallery-busyoverlay,gallery-formmgr-css-validation,gallery-node-optimizations,gallery-scrollintoview,array-extras,gallery-funcprog,escape
#component.supersedes=
component.optional=datasource,dataschema,gallery-paginator
component.skinnable=true
@@ -1186,16 +1186,7 @@ Y.extend(BulkEditor, Y.Widget,
function cleanHTML(s)
{
- if (!s)
- {
- return '';
- }
-
- return s.toString()
- .replace(/<\/?script>/ig, '')
- .replace(/&/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
+ return (s ? Y.Escape.html(s) : '');
}
BulkEditor.error_msg_markup = Y.Lang.sub('<div class="{c}"></div>',

0 comments on commit aa1e769

Please sign in to comment.