From ed7cbdc2c3f2675e5b03f7b6007a13bbd5bf71ef Mon Sep 17 00:00:00 2001 From: Stephen Rushing Date: Mon, 3 Feb 2014 12:12:53 -0500 Subject: [PATCH] Updated iframe regex for MediaType detection The previous regex required the iframe to have an attribute after "src", so didn't work, but things like did. Since only the src is used and the rest of the iframe is reconstructed, there's no need for extra attributes, and had me searching for a bit. --- source/js/Core/Media/VMM.MediaType.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/js/Core/Media/VMM.MediaType.js b/source/js/Core/Media/VMM.MediaType.js index 52941f2..950b5bc 100644 --- a/source/js/Core/Media/VMM.MediaType.js +++ b/source/js/Core/Media/VMM.MediaType.js @@ -124,7 +124,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') { } else if (d.match('iframe')) { media.type = "iframe"; trace("IFRAME") - regex = /src=['"](\S+?)['"]\s/; + regex = /src=['"](\S+?)['"](\s|>)/; group = d.match(regex); if (group) { media.id = group[1]; @@ -146,4 +146,4 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') { } return false; } -} \ No newline at end of file +}