Don't escape special chars in autolinks in the rich-text editor

What does this MR do and why?

Don't escape special characters in autolinks in the rich-text editor! Fixes Rich text editor duplicates some backslashes (#507450 - closed).

Regressed in Remove preserve_markdown FF and supporting code (!218383 - merged), precisely at this exact line — the LHS had escape: false, which looked specific to preserveUnchangedMark (which was part of the preserve_markdown FF, then being removed), but was actually keeping escaping from happening too for the regular pathway.

We have a state.inAutolink mechanism for preventing this correctly, so let's use it.

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Go to a Markdown field on your GDK, and in the plain-text editor, enter a URL with a ~ or a \ in it. I'm using https://pokemon.com/~hi as an example.
  2. Switch between plain- and rich-text editors. It should remain the same.
  3. Switching to the rich-text editor, add a single letter anywhere in the text field. Just change the input somehow.
  4. Switch back to the plain-text editor. An extra backlash has appeared.
  5. Switch back to the rich-text editor and make another single change.
  6. Switch back to the plain-text editor. The backslashes have increased in number.
  7. etc.
  8. Check out this branch.
  9. Repeat, and rejoice, at the lack of backslash proliferation.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Asherah Connor

Merge request reports

Loading