/ Published in: ASP

YouTube offers a method for users and developers to embed video on their web pages. Unfortunately the code that they use doesn't validate. Use this function to make YouTube's embed code validate.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Function YouTubeCleanup(embed,link) if len(replace(embed,"youtube","")) << len(embed) then url = "http://www.youtube.com/v/" & replace(link,"http://www.youtube.com/watch?v=","") & "&hl=en" embed = "<object type=""application/x-shockwave-flash"" data=""" & url & "&hl=en""><param name=""movie"" value=""" & url & """></object>" end if YouTubeCleanup = embed End Function
URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=18
Comments
