Re: ereg() violence
| From: | Jesse Binam | Date: | Wed, 08 Nov 2000 05:13:43 +0000 |
| Subject: | Re: ereg() violence | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24267@lists.php.net to get a copy of this message | ||
Your misunderstanding is that this isn't going to a browser it is going to
an email client like outlook or netscape mail.
If a member asks for text email and I send them the HTML code that is
exactly what they see... the HTML code.
If a member asks for HTML email and I send them the HTML code it will show
up like it would on a web page.
So I need to take the HTML code that the author writes and strip it down to
just ASCII text and replace tags like
<br>, <p>, <div> with a new line replace HTML codes with text equivelent
like & with & strip all other HTML
tags that have no place in a text message like <b>, <font>, etc. and it
would be nice if it would find the img tags and
replace them with something like <<image.jpg>> so that even the users that
can't see the image know that there is
suppose to be one there.
Is this a little more clear?
Thanks,
Jess
----- Original Message -----
From: Maxim Maletsky <maxim.maletsky@japaninc.net>
To: 'Jesse Binam' <sirbinam@xmission.com>; <php-general@lists.php.net>
Sent: Tuesday, November 07, 2000 10:00 PM
Subject: RE: [PHP] ereg() violence
>
> On your examples:
>
> --- : mode (1)
> <font color="FF0000" face="Verdana">HELLO WORLD & OTHER
> PEOPLE</font><br>
> <br>
> <img src="image.jpg">
> ---
>
> --- : mode (2)
> HELLO WORLD & OTHER PEOPLE
>
> <<image.jpg>>
> ---
>
> mode (2) will be visible within a browser.
> So I don't think you should do there anything except addslashes() and
> stripslashes(),
>
> You can then have the mode (1) inside a database and just echo it on a
page:
> it will be seen as mode (2)
>
> Then if someone checks box saying it's a text format what you need will be
> just make it look like mode (1) (itself) with htmlentities()
>
> I guess I don't understand what exactly you meant..
>
> Cheers,