Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/155908
Change subject: Allow exclamation point in attribute values ...................................................................... Allow exclamation point in attribute values * 97c45e848535185600f6d0fa8fe175f88786cd9b prevents them being eaten as attribute names but was perhaps a bit overreaching. Only the attribute_preprocessor_text_line production is used in parsing names. * Maintains the fix from that bug, {| ! Foo !! style="color: red" | Bar |} * And fixes the recent one reported, {| title="!=foo" |foo |} * A little cleanup as well. Change-Id: I493df53632f6baa9c7b2b01f5fd7f2e620b69f05 --- M lib/pegTokenizer.pegjs.txt 1 file changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/08/155908/1 diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt index 1118bd3..dc46b76 100644 --- a/lib/pegTokenizer.pegjs.txt +++ b/lib/pegTokenizer.pegjs.txt @@ -99,11 +99,8 @@ /* The 'redirect' magic word. * The leading whitespace allowed is due to the PHP trim() function. */ -redirect_word = sp:[ \t\n\r\0\x0b]* rw:((!space_or_newline ![:\[] c:.{return c;})+) +redirect_word = sp:[ \t\n\r\0\x0b]* rw:(!space_or_newline ![:\[] c:.{return c;})+ { - if ( !rw ) { - rw = ""; - } rw = rw.join(''); if ( options.env.conf.wiki.getMagicWordMatcher( 'redirect' ).test( rw ) ) { return sp.join('') + rw; @@ -2105,6 +2102,7 @@ { return tu.flatten_string( r ); } + attribute_preprocessor_text_single_broken = r:( t:[^{}&'<>|]+ { return t.join(''); } / !inline_breaks r:( @@ -2114,6 +2112,7 @@ { return tu.flatten_string( r ); } + attribute_preprocessor_text_double = r:( t:[^{}&"<]+ { return t.join(''); } / !inline_breaks r:( @@ -2124,6 +2123,7 @@ //console.warn( 'double:' + pp(r) ); return tu.flatten_string( r ); } + attribute_preprocessor_text_double_broken = r:( t:[^{}&"<>|]+ { return t.join(''); } / !inline_breaks r:( @@ -2157,31 +2157,34 @@ } attribute_preprocessor_text_single_line - = r:( t:[^{}&'<|!\n]+ { return t.join(''); } + = r:( t:[^{}&'<|\n]+ { return t.join(''); } / !inline_breaks r:( directive / ![\r\n] q:[{}&<] { return q; } ) { return r; } )* { return tu.flatten_string( r ); } + attribute_preprocessor_text_single_line_broken - = r:( t:[^{}&'<>|!\n]+ { return t.join(''); } + = r:( t:[^{}&'<>|\n]+ { return t.join(''); } / !inline_breaks r:( directive / ![\r\n] q:[{}&<] { return q; } ) { return r; } )* { return tu.flatten_string( r ); } + attribute_preprocessor_text_double_line - = r:( t:[^{}&"<|!\n]+ { return t.join(''); } + = r:( t:[^{}&"<|\n]+ { return t.join(''); } / !inline_breaks r:( directive / ![\r\n] q:[{}&<] { return q; } ) { return r; } )* { return tu.flatten_string( r ); } + attribute_preprocessor_text_double_line_broken - = r:( t:[^{}&"<>|!\n]+ { return t.join(''); } + = r:( t:[^{}&"<>|\n]+ { return t.join(''); } / !inline_breaks r:( directive / ![\r\n] q:[{}&<] { return q; } ) { return r; } -- To view, visit https://gerrit.wikimedia.org/r/155908 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I493df53632f6baa9c7b2b01f5fd7f2e620b69f05 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra <abrea...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits