Rewrite the video/audio logic, fix two critical vulnerabilities

- Make the video/music logic meaningful.
- Fix two critical XSS vulnerabilities in the code (you have probably seen them).
- More regexps.
Fix the merge conflicts from the upstream repository
Merge pull request #178 from Robertof/master

Rewrite the video/audio logic and fix two critical vulnerabilities