Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
13.10.2, 14.0
-
None
-
Unknown
-
Description
When starting a format with three characters (like ***) instead of two, the third character is inside the format. When escaping the first of the three characters, the additional character should be before the format. While this works, when rendering back to XWiki 2.0/2.1 syntax (e.g., because of saving in the WYSIWYG editor), the escaping is lost.
Steps to reproduce:
- Edit a page in the WYSIWYG editor.
- Enter the text *bold text.
- Select the text bold text and apply bold formatting.
- Switch to source and change anything (e.g., add the word "part" after "text").
- Switch back to WYSIWYG.
Expected result:
The symbol * is still not bold.
Actual result:
The symbol * is now part of the bold text.
This can also be reproduced with the following failing test case (the conversion back to the input value fails):
.#--------------------------------------------------------------------------------------------------------- .inputexpect|xwiki/2.0 .# Validate that escaping before format start is preserved. .#--------------------------------------------------------------------------------------------------------- ~***Bold test** ~---Strike through-- .#----------------------------------------------------- .expect|event/1.0 .#----------------------------------------------------- beginDocument beginParagraph onSpecialSymbol [*] beginFormat [BOLD] onWord [Bold] onSpace onWord [test] endFormat [BOLD] onNewLine onSpecialSymbol [-] beginFormat [STRIKEDOUT] onWord [Strike] onSpace onWord [through] endFormat [STRIKEDOUT] endParagraph endDocument .#----------------------------------------------------- .expect|annotatedxhtml/1.0 .#----------------------------------------------------- <p>*<strong>Bold test</strong><br/>-<del>Strike through</del></p>