The solution I implemented was to escape '<' in style content on both toHtml and toDataFormat editor events.
My first naive solution was to fix directly the HTML string:
but this doesn't work because we keep the macro source code in an attribute (data-macro) where we escape only the quotes, so we replace too much (breaking the macro source). The second approach that works is:
If you can't upgrade XWiki you can fix the problem by using this code in a JSX object that is loaded on the wiki:
|