0

I want to let my 'untrusted' users to use wysiwyg plus to embed videos (at least from YouTube) in their posts. Is there a universal PHP class to filter outputs to protect from xss?

Ted
  • 3
  • 1
  • 1
    Related http://stackoverflow.com/questions/2319956/are-there-any-good-php-based-html-filters-available/2319996#2319996, http://stackoverflow.com/questions/1210042/html-purifier-what-to-purify, http://stackoverflow.com/questions/2774074/best-practice-user-generated-html-cleaning, http://stackoverflow.com/questions/3048982/tinymce-security-question-how-do-you-prevent-malicious-input – Mike B Nov 29 '10 at 16:34

2 Answers2

0

Nope. Your best bet is to create a new button for embedding the video. And ditching wysiwyg plus if it doesn't use some kind of bb code. Or accept the possibility of XSS.

DampeS8N
  • 3,621
  • 17
  • 20
0

The issue should not only be limited to preventing XSS when adding a YouTube link, what about the rest of the content? There are a couple of options for handling the output of what users may enter, see:

Sanitize

and

AntiSamy

SW4
  • 69,876
  • 20
  • 132
  • 137