← Back to team overview

mahara-contributors team mailing list archive

[Bug 1207140] Re: YouTube filter requires updates

 

I just had a discussion with Robert about this. The "//" URL is a
standard (though somewhat obscure) way to write a URL. It's usually
referred to as a "protocol-relative URL", it's part of the RFC
definition for URLs, and it's supported by all the modern browsers
including IE7+ (although apparently IE7 & 8 will attempt to fetch the
http and https version a protocol-relative URL resource
http://billpatrianakos.me/blog/2013/04/18/protocol-relative-urls/ )

Since Firefox 23 has just introduced a new default setting that blocks
iframes which have a different http/https protocol than the parent page,
I bet we're going to see many more vendors start adopting protocol-
relative URLs in their embed code. So what we ought to do is adapt
Mahara to handle these properly.

Although, for backwards-compatibility, we're also going to need to do a
find/replace on all the existing external content blocks, to make sure
their iframe URLs match up with the site's URL. That could either be a
DB upgrade script, or it could be a last-minute find/replace in the
external content block's rendering function.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contrib members
https://bugs.launchpad.net/bugs/1207140

Title:
  YouTube filter requires updates

Status in Mahara ePortfolio:
  Fix Committed
Status in Mahara 1.6 series:
  In Progress
Status in Mahara 1.7 series:
  Fix Committed
Status in Mahara 1.8 series:
  In Progress

Bug description:
  1. The iframe embed code for YouTube videos does not have the protocol
  included anymore thus causing problems when trying to embed the code
  into a site.

  The code reads:
  <iframe width="560" height="315" src="//www.youtube.com/embed/XXXXX?rel=0" frameborder="0" allowfullscreen></iframe>

  YouTube says:

  ''Just using //: instead of http:// or https:// means that you would
  like to use whichever protocol the parent page is using.

  So a page called http://example.com with include http://youtube.com
  and a page called https://example.com with include https://youtube.com

  It's intentional.''

  https://groups.google.com/a/googleproductforums.com/d/msgid/youtube
  /bce484af-b2e6-4f6e-9bc0-6c7617e08406%40googleproductforums.com

  2. When someone wants to use the YouTube URL from a mobile device, it
  is shortened to youtu.be. However, these videos can't be embedded
  because the filter doesn't understand that URL.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1207140/+subscriptions


References