Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: How to remove HTML tags from text

by cLive ;-) (Prior)
on Feb 05, 2005 at 00:00 UTC ( #428254=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to remove HTML tags from text
in thread How to remove HTML tags from text

nope.
$data = <<_END_; <script language="JavaScript"> alert("Boo!") </script > _END_
A /s modifier would help a little, but doesn't solve everything. Eg, what about this tag?
$data = qq{ <img src="hello.jpg" alt="x>y" width="60" height="60" /> } +;

Lesson: never treat HTML parsing as a "back of an envelope" exercise :)

cLive ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2023-03-21 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?