Content Editor: Temporarily ignore HTML comments in client-side parser
What does this MR do and why?
NOTICE: These changes are behind the preserve_unchanged_markdown
feature flag.
This MR temporarily ignores HTML comments in the client-side Markdown parser used by the Content Editor. This change is temporary because we will implement support for editing HTML comments in future iterations. The current behavior of the Content Editor is failing when it finds an HTML comment inside a Markdown document.
Follow-up issue to implement proper HTML comments support: #342173 (closed)
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable the
preserve_unchanged_markdown
feature flag. - Edit or create a Wiki page
- Paste the following snippets in the Classic Markdown Editor:
<![CDATA[ function matchwo(a,b) { if (a < b && a < 0) then { return 1; } else { return 0; } } ]]> This is a comment <!-- This is a comment -->
- Switch to the Content Editor. The Content Editor should remove the HTML comments.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #365292 (closed)
Edited by Enrique Alcántara