mickyginger — 2012-05-26T07:48:00-04:00 — #1
I'm embedding a youtube vid into a webpage using jQuery. Why? Because I want valid HTML markup.
So here's what I'm doing:
var youtube = $('#youtube a').attr('href').match(/http:\\/\\/youtu.be\\/(.+)/);
$('#youtube').append('<iframe width="560" height="315" src="http://www.youtube.com/embed/' + youtube + '" frameborder="0" allowfullscreen></iframe>');
The HTML markup is as follows:
<a href="http://youtu.be/dr0tCny046Q">New Video - Not Tonight</a>
And I'm getting the following error message:
What gives? Don't really understand why this is unsafe. Not sure what to do about it.
chris_upjohn — 2012-05-26T08:37:37-04:00 — #2
mickyginger — 2012-05-28T06:42:33-04:00 — #3
Thanks Chris, I'll look into it.