Index: trunk/extensions/VisualEditor/tests/parser/parserTests-whitelist.js |
— | — | @@ -62,7 +62,9 @@ |
63 | 63 | |
64 | 64 | testWhiteList["<pre> with forbidden attribute values (bug 3202)"] = "<pre width=\"8\" style=\"\">Narrow screen goodies</pre>"; |
65 | 65 | |
66 | | -//testWhiteList["Piped link to URL"] = "<p>Piped link to URL: [<a href=\"http://www.example.com|an\" data-mw-type=\"external\">example URL</a>]</p>"; |
| 66 | +// This is valid, just confusing for humans. The reason for disallowing this |
| 67 | +// might be history by now. XXX: Check this! |
| 68 | +testWhiteList["Link containing % as a double hex sequence interpreted to hex sequence"] = "<p><a href=\"/wiki/7%2525_Solution\" data-mw-type=\"internal\">7%25 Solution</a></p>"; |
67 | 69 | |
68 | 70 | if (typeof module == "object") { |
69 | 71 | module.exports.testWhiteList = testWhiteList; |
Index: trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt |
— | — | @@ -1385,7 +1385,7 @@ |
1386 | 1386 | |
1387 | 1387 | table_cell_args |
1388 | 1388 | = & { return setFlag('tableCellArg'); } |
1389 | | - as:generic_attribute+ space* "|" !"|" { |
| 1389 | + as:generic_attribute* space* "|" !"|" { |
1390 | 1390 | clearFlag('tableCellArg'); |
1391 | 1391 | return as; |
1392 | 1392 | } |
Index: trunk/extensions/VisualEditor/modules/parser/ext.core.LinkHandler.js |
— | — | @@ -244,7 +244,7 @@ |
245 | 245 | var href = this.manager.env.lookupKV( token.attribs, 'href' ).v, |
246 | 246 | content= this.manager.env.lookupKV( token.attribs, 'content' ).v; |
247 | 247 | href = this.manager.env.sanitizeURI( href ); |
248 | | - console.warn('extlink href: ' + href ); |
| 248 | + //console.warn('extlink href: ' + href ); |
249 | 249 | //console.warn( 'content: ' + JSON.stringify( content, null, 2 ) ); |
250 | 250 | // validate the href |
251 | 251 | if ( this.imageParser.parseURL( href ) ) { |
Index: trunk/extensions/VisualEditor/modules/parser/mediawiki.parser.environment.js |
— | — | @@ -222,7 +222,7 @@ |
223 | 223 | var host = s.match(/^[a-zA-Z]+:\/\/[^\/]+(?:\/|$)/), |
224 | 224 | path = s, |
225 | 225 | anchor = null; |
226 | | - console.warn( 'host: ' + host ); |
| 226 | + //console.warn( 'host: ' + host ); |
227 | 227 | if ( host ) { |
228 | 228 | path = s.substr( host[0].length ); |
229 | 229 | host = host[0]; |