Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
13.10.3
-
None
-
Unknown
-
Description
There's no escaping for the wiki macros syntax injected in the wiki editor toolbar, so using this toolbar inside a wiki syntax page with an html macro leads to a break of this HTML macro.
The problem is really visible when trying to display in edit mode an xclass field named "content" (only case when the toolbar is displayed) using the wiki editor, in a wiki page: it breaks the html macro.
Quick reproduction steps:
- Import the attached XAR
- Display the page
Obtained result:
- The html macro is broken, it displays properly the editor, but the following content is displayed like this:
{{/html}} Some code outside html {{html}} mydiv {{/html}}
Expected result:
- It should display the editor and no code under it but only
Some code outside html mydiv
Long reproduction steps:
- Create an xclass named "Main.TestContent" with a TextArea field named "content" and with Wiki editor
- Create a page with following content:
{{velocity}} #template('display_macros.vm') {{html clean="false"}} #set ($docMessageClass = $xwiki.getDocument('Main.TestContent')) #set ($messageClass = $docMessageClass.getxWikiClass()) #set ($messageObj = $doc.newObject('Main.TestContent')) #set ($contentField = $messageClass.get('content')) #set ($editor = $doc.displayEdit($contentField, '', $messageObj)) $!editor {{/html}} Some code outside html {{html}} <div>mydiv</div> {{/html}} {{/velocity}}
- Check the result of that page
Same expected and obtained result as above.
Attachments
Issue Links
- is related to
-
XWIKI-19281 Breaking bootstrap modal when using Wiki editor
- Open
-
DISCUSSION-38 MessageClass should not specify WISYWIG editor by default
- Closed
- relates to
-
XWIKI-19510 XWikiDocument#display should check if we are inside an html macro
- Open