Loading
Refactor RTE embed URL check, minor fixes
What does this MR do and why?
Refactor RTE embed URL check and minor fixes.
We also:
- show an error when you try to change an embed to a URL that doesn't match any provider. See below.
- correctly handle the edge where embeds are enabled, but no providers
(
{}is truthy!).
resolveEmbed gains more users in stacked MRs (Add `<iframe>` embed insert to RTE (!265664 - merged), Detect embeddable URL in the RTE and offer to c... (!265667 - merged)).
Screenshots or screen recordings
How to set up and validate locally
The new error message is the only visible change, so we test that:
- Check out
master. - Enable the
allow_iframes_in_markdownFF. - Go to Admin → Settings → General → Embedded content.
- Check "Enable embedded content", "YouTube", and "Figma", then click "Save changes".
- Maybe restart your GDK/Caproni unless you're feeling the light of Providence shining upon you this day.
- Enter
in a comment or WI/MR description in the plain-text editor. - Switch to the rich-text editor.
- Click the embed, then the
✏️ icon that appears above it, and in the popup menu that opens, change the target to something unsavoury, likehttps://sugarstation.com.au. - Click "Apply". After a moment, the popup simply vanishes, and nothing changes.
- Check this branch out.
- Repeat steps 6 through 9; instead of disappearing, you see an error like the recording above.
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