Details
Description
XMLUtils#escapeXMLComment should also escape { as this is what is used in XHTML rendering to escape XML comments that are used for metadata which may contain user-generated content and such content may be injected in HTML macros. This metadata is only generated in the annotated renderers and I was unable to trigger it in nested rendering contexts where this could be used to actually close a surrounding HTML macro so as of now I'm not aware of any security impact. The only place where I'm aware that this was exploitable is the situation described in CKEDITOR-134 but this has been fixed independently.
This is a follow-up of XWIKI-7894.