security for wysiwyg editor

Discussion in 'PHP' started by junandya, Jan 10, 2008.

  1. #1
    Hello, i use wysiwyg editor in my website. usually i use htmlspecialchars, to filter each field, in my form. But it seem, if i use htmlspecialchars to the textarea in wysiwyg field, it wont work. it will apppear a text with some html code.

    my questiuon is:

    1. is it secure to leave htmlspecialchars for each field?
    2. Does anyone know a method to filter a field (textarea) from wysiwyg editor.

    Thanx
     
    junandya, Jan 10, 2008 IP
  2. Kieran.in

    Kieran.in Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    With the editor there's probabally a Rich text and a HTML option.

    You should echo the code out using the HTML option in the javascript. I'm pretty sure there will be an option to parse the HTML.
     
    Kieran.in, Jan 10, 2008 IP