Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.1.2, 4.0.1
-
None
-
Unit, Integration
-
N/A
-
N/A
-
Description
There's yet another regression of XRENDERING-88 (http://ci.xwiki.org/job/xwiki-enterprise-test-wysiwyg/org.xwiki.enterprise$xwiki-enterprise-test-wysiwyg/1399/testReport/org.xwiki.test.wysiwyg/MacroTest/testEditMacroWithSpecialCharactersInParameterValues/). This is, however, a more general problem of ambiguity in how the escape charater, '~', is implemented:
This is a typical example:
<#PARAMS: "(%" ( "~" ~[] | ~["%"] | ["%"] ~[")"] )* "%)" >
But there is a problem with ambiguity here. Take this example:
(% %~~%) %)
The PARAMS token here will be suprisingly be the whole string, because the substring "%~" matches the subpatter ["%"] ~[")"], and taking that path leads to a longer token.