[resolved] YouTube height/width dimensions being stripped (2 posts)

  1. kgagne
    Posted 6 years ago #

    I'm having an issue with a YouTube video embedded on one of my blogs. It shows correctly when viewing the individual post in which it appears:


    But when viewing the category archive, its dimensions are scaled down:


    Looking at the page's source, it seems that the archive view is stripping the dimensions out of the YouTube embed code. So instead of starting with

    <object width="480" height="295"><param name="movie"


    <object ><param name="movie"

    Any idea what could cause this to happen? I've tried other posts and other videos in this same theme, and the same problem recurs, so I don't think it's my coding of this particular instance.

  2. kgagne
    Posted 5 years ago #

    Even YouTube's new iFrame code got munged by this theme, with this:

    <center><iframe title="YouTube video player" class="youtube-player" type="text/html" width="575" height="353" src="http://www.youtube.com/embed/NugRZGDbPFU" frameborder="0"></iframe></center>

    Becoming this:

    <p><center><iframe title="YouTube video player" class="youtube-player" type="text/html" src="http://www.youtube.com/embed/NugRZGDbPFU" frameborder="0"></iframe></center></p>

    The fix was to replace all the quotation marks in the embed code with apostrophes.

Topic Closed

This topic has been closed to new replies.

About this Topic