in reply to Re: Re: View The HTML ???
in thread View The HTML ???
Update: I'm a klutz.. don't forget to see asarih's reply below.
FWIW, you need to add s/&/&/g; to your substitutions for a minimal escaping solution.
Also, you must terminate your entities with a semicolon - it's < and not <. (Well, the latter is acceptable in some cases under SGML, but don't go there unless you like headaches.)
A few style suggestions on your code - try something like this:
Much easier on the eyes, no? Anyway, as I've already said:s/</</ for @HTML; s/>/>/ for @HTML; s/&/&/ for @HTML; print '<textarea>', join("", @HTML), '</textarea>';
use CGI qw(:standard); print textarea('', escapeHTML(join '', @HTML));
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re^3: View The HTML ???
by asarih (Hermit) on Aug 26, 2003 at 02:58 UTC | |
Re: Re^3: View The HTML ???
by halley (Prior) on Aug 26, 2003 at 16:18 UTC |
In Section
Seekers of Perl Wisdom