Browse Source

Updated iframe regex for MediaType detection

The previous regex required the iframe to have an attribute after "src", so <iframe src="..."></iframe> didn't work, but things like <iframe src="..." frameborder="no"></iframe> 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.
pull/567/head
Stephen Rushing 11 years ago
parent
commit
ed7cbdc2c3
  1. 4
      source/js/Core/Media/VMM.MediaType.js

4
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;
}
}
}

Loading…
Cancel
Save