Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Perl CGI, font color in a table

by oko1 (Deacon)
on Feb 28, 2012 at 06:27 UTC ( #956587=note: print w/replies, xml ) Need Help??

in reply to Perl CGI, font color in a table

Question #1 is, why are you doing an 'escapeHTML' on a plain-text string? Unless you're defanging arbitrary input, it's not very useful - and getting rid of it would make your life much easier.

Having said that, there is a (less-than-pretty) solution: </p?

print td("font color='red'>".escapeHTML("required")."</font>");
I hate storms, but calms undermine my spirits.
 -- Bernard Moitessier, "The Long Way"

Replies are listed 'Best First'.
Re^2: Perl CGI, font color in a table
by Sinistral (Monsignor) on Feb 28, 2012 at 13:49 UTC

    This works, of course, but I want to make sure that the OP knows that using the font tag is very much deprecated in web design. Use the ideas later in this thread where an inline style (marginally preferable) or a CSS class (much preferable) is used along with an associated definition of the CSS class.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2023-06-08 08:30 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.