develooper Front page | perl.libwww | Postings from November 2001

HTML::Entities::encode()

Thread Next
From:
Jeroen Wynen
Date:
November 15, 2001 19:13
Subject:
HTML::Entities::encode()
Message ID:
20011116031310.65790.qmail@web20302.mail.yahoo.com
Hello,

I've got a short question about
HTML::Entities::encode_entities()...
Why are linefeeds excluded from encoding, while
carriage returns are not?

# Encode control chars, high bit chars and '<', '&',
'>', '"'
$$ref =~ s/([^\n\t !\#\$%\'-;=?-~])/$char2entity{$1}
|| num_entity($1)/ge;

Tnx,
Jeroen.

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About