r111922 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111921‎ | r111922 | r111923 >
Date:11:14, 20 February 2012
Author:gwicke
Status:deferred
Tags:
Comment:
Add some comments to the Sanitizer
Modified paths:
  • /trunk/extensions/VisualEditor/modules/parser/ext.core.Sanitizer.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/parser/ext.core.Sanitizer.js
@@ -84,12 +84,18 @@
8585
8686 /**
8787 * Sanitize any tag.
 88+ *
 89+ * XXX: Make attribute sanitation reversible by storing round-trip info in
 90+ * token.dataAttribs object (which is serialized as JSON in a data-mw-rt
 91+ * attribute in the DOM).
8892 */
8993 Sanitizer.prototype.onAny = function ( token ) {
9094 // XXX: validate token type according to whitelist and convert non-ok ones
9195 // back to text.
9296
9397 // Convert attributes to string, if necessary.
 98+ // XXX: Likely better done in AttributeTransformManager when processing is
 99+ // complete
94100 if ( token.attribs ) {
95101 for ( var i = 0, l = token.attribs.length; i < l; i++ ) {
96102 var kv = token.attribs[i];

Status & tagging log