I have an rss feed for news articles. The articles contain embedded YouTube videos using the Media and Media: YouTube modules. The description element is set as the body of the content, which contain the youtube iframe embeds.
With the "Replace relative paths with absolute URLs" disabled, the videos are correctly viewable using the feed. If this option is enabled, the src attribute of the iframe is rewritten, improperly placing the absolute path of the site in front of the path. This is because the src attribute contains "//www.youtube.com/..." without http or https to allow for either ssl or non-ssl links, depending on the current context of the page.
I think the solution is to edit the regular expression to allow for paths like these to be accepted as absolute, but I'm not sure of the modifications needed to the regex.
For example:
<iframe class="media-youtube-player" width="570" height="347" title=""We're Too Famous" Official Music Video" src="//www.youtube.com/embed/zDhSItfjlZ8?wmode=opaque&modestbranding=1&rel=0" frameborder="0" allowfullscreen="">Video of &quot;We&#039;re Too Famous&quot; Official Music Video</iframe>
becomes:
<iframe class="media-youtube-player" width="570" height="347" title=""We're Too Famous" Official Music Video" src="http://www.fanlala.com//www.youtube.com/embed/zDhSItfjlZ8?wmode=opaque&modestbranding=1&rel=0" frameborder="0" allowfullscreen="">Video of &quot;We&#039;re Too Famous&quot; Official Music Video</iframe>
Comments
Comment #1
bropp CreditAttribution: bropp commentedFor now, I have worked around the issue by requiring all of my youtube embeds to use https exclusively.
Comment #2
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedSolution proposed by logicalor in #1832794: Regular Expression for matching relative paths breaks Google Adwords Remarketing javascript (and others) applied and pushed to 7.x-2.x-dev and 6.x-2.x-dev on d.o.
Comment #3.0
(not verified) CreditAttribution: commentedtypo fix