Prevent serialization from failing in RTE
What does this MR do and why?
Prevent serialization from failing in RTE
If there's a malformed link in the document, wrap it in a try/catch to prevent serialization (and therefore saving) from failing
Changelog: fixed
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
Screen Recording 2023-10-11 at 11.39.19.mov | Screen Recording 2023-10-11 at 11.42.31.mov |
Error in console, prevents saving of the document in its latest state | No error in console. Document saves as expected |
How to set up and validate locally
- In the rich text editor type in a URL with a stray
%
sign. Example:https://example.com/%
- Press space after the URL to trigger autolink.
- Try to save. Notice there might be some data loss as the anything you add after the link exists in the document isn't serialized, and hence saved.
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 #411525 (closed)
Edited by Himanshu Kapoor