Brad Whitaker (whitaker) wrote in lj_dev,
Brad Whitaker
whitaker
lj_dev

HTML Escaping and crap...

This is quick. I noticed that my poll creator messes up if you put, for instance, an IMG tag as an option, or in the text of a question, etc.

So first I need to &ehtml the stuff so that it'll display properly in the VALUE="blahblah" section of the input elements when they are still creating the form.

That's no problem. Then when they click "Generate" I need to undo the &ehtml stuff, and I'm thinking I should also run it through the HTML cleaner? Only prob, I don't know jack about the HTML cleaner... and is this even the "right" way to do it?

So I guess I need: A) help with undoing the ehtml (I assume there's a function somewhere that I'm missing) and B) help with LJ::CleanHTML. What HTML tags to allow? Etc? Maybe I should just use the &LJ::CleanHTML::clean_subject stuff? I dunno.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments