Pass iframe dimensions through if supplied

What does this MR do and why?

Per #282443 ("What Could Still Be Implemented"), let's apply the width/height attributes to embedded frames the same way we do images.

I've also extracted the spec fixtures into a separate file for cleanliness' sake.

References

Past work:

Present work: a series of 4 stacked MRs for %18.10 to bring this closer to GA:

Screenshots or screen recordings

image

How to set up and validate locally

  1. Check out the branch.
  2. Enable the allow_iframes_in_markdown feature on your GDK.
  3. Enable embedding of www.youtube.com from /admin/application_settings/general#js-iframe-settings, and ensure Enable embedded content is turned on.
  4. It may be wise to restart the GDK Rails instance here, for best chances of success.
  5. Using the plain-text editor, insert content like seen in the screenshot above to a wiki page, issue description, MR comment, etc.:
    Here's my YouTube video at default size:
    
    ![](https://www.youtube.com/embed/DwIepRJgMF4)
    
    Here it is with a reasonable size applied:
    
    ![](https://www.youtube.com/embed/DwIepRJgMF4){width=800 height=600}
  6. It should look as it does in the screenshot above. (The status quo is that both embeds would be the same size as the first.)

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