Re: Re: stripping html tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, June 6, 2005 1:05 am, Dotan Cohen said:
> I am trying to access my local pop3 mail via wap. When I get home I
> download the messages, but while away I need access to them. I am
> trying to strip those tags from html mails so that they will display
> in my wap browser.

So, on your current path, you are going to assume that nobody will send
you malicious email, targetted at your particular phone/wap model/device,
and only strip out the tags you think are messing with display...

Chris is suggesting that that's Bad Security, and he's right.

Viruses for wap devices are being developed at break-neck speeds.

Personally, I'd just call strip_tags() and not let ANY tags through, if I
wanted to try to read email through my phone in the first place...

Do you really need those fancy layouts and big images chewing up your cell
phone bandwidth/charges?...

Still, if you insist on ripping out only the 4 tags, preg shouldn't be
THAT hard...

The very first example on: http://us4.php.net/preg_replace shows how to
rip out the <script> tag and its contents.  It also rips out ALL html, but
you should be able to chop that second array element out, along with the
'', in the replacement array, and be pretty much done...

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux