Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

(un)escaping html with

by kb2yht (Acolyte)
on Sep 20, 2004 at 16:41 UTC ( #392410=perlquestion: print w/replies, xml ) Need Help??

kb2yht has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, Have a little problem i can not seems to find an answer to in the library or in CPAN docs. I'me using for a data-base backended set of scripts, In one on the tables I am returned a set of pre-htmlised strings to use as the labels of a CGI::popup_menu. It seems that or at least the popup menu function escapes the strings in a -label=> hash so that
$->popup_menu("fooname",\%db_return_hash,"default"); if "fooébar" is returned as eiter a name or a value in db_return_hash it becomes "fooébar"
Any help or pointers would be a great help, Kb2yht

Replies are listed 'Best First'.
Re: (un)escaping html with
by Velaki (Chaplain) on Sep 20, 2004 at 16:52 UTC

    You should be able to turn off the feature known as autoEscape as per the module CGI prior to creating your popup, and then turn it back on afterwards, so it would look something like this:

    $query->autoEscape(0); # turn it off $query->popup_menu("fooname",\%db_return_hash,"default"); $query->autoEscape(1); # turn it back on

    Hope that helped,
    "Perl. There is no substitute."
      Much thanks, I some how missed the autoEscape call in my reading.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://392410]
Approved by Velaki
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2023-09-25 04:06 GMT
Find Nodes?
    Voting Booth?

    No recent polls found