http://qs321.pair.com?node_id=956587


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.