Index: trunk/extensions/VisualEditor/modules/parser/ext.core.Sanitizer.js |
— | — | @@ -84,12 +84,18 @@ |
85 | 85 | |
86 | 86 | /** |
87 | 87 | * 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). |
88 | 92 | */ |
89 | 93 | Sanitizer.prototype.onAny = function ( token ) { |
90 | 94 | // XXX: validate token type according to whitelist and convert non-ok ones |
91 | 95 | // back to text. |
92 | 96 | |
93 | 97 | // Convert attributes to string, if necessary. |
| 98 | + // XXX: Likely better done in AttributeTransformManager when processing is |
| 99 | + // complete |
94 | 100 | if ( token.attribs ) { |
95 | 101 | for ( var i = 0, l = token.attribs.length; i < l; i++ ) { |
96 | 102 | var kv = token.attribs[i]; |