Reply to Re: [PHP] Re: stripping html tags

Your name:

Reply:


Posted by "Richard Lynch" on 06/07/05 01:10

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация