in reply to CGI module seems to eat html entities!

When are those eaten? Are you really sure they are eaten by CGI.pm ? I kinda doubt it.

If you enter a < into the textarea and submit it, what does the file contain? Download it by the FTP and look at what was actually stored in the file! If you then go back to edit that file, what do you see in the text area? Doesn't this eating happen a bit later than you thought? And do you escape the text for HTML while producing the form page? You should!

Jenda
XML sucks. Badly. SOAP on the other hand is the most powerfull vacuum pump ever invented.

  • Comment on Re: CGI module seems to eat html entities!

Replies are listed 'Best First'.
Re^2: CGI module seems to eat html entities!
by muba (Priest) on Oct 03, 2005 at 14:13 UTC
    Ok. That was an eye-opener! CGI is not the one to blame, if I enter &lt; it stores it like that. When I then re-edit the file, it shows a < character.
    Good. You tell me to escape the HTML text. So I tried (naive me!) quotemeta() but that messes things up.
    Alright, I'll be finding a nice HTML::(somewhat) module.
    Thanks for pointing me in this direction!

      use HTML::Entities;

      Jenda
      XML sucks. Badly. SOAP on the other hand is the most powerfull vacuum pump ever invented.