Published in: ASP
URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=18
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.
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
You need to login to post a comment.
