On 09-Dec-2004 Marek Kilimajer wrote:
>
> not really, but it removes and so javascript is
> not
> interpreted.
$txt = preg_replace('|]*?>.*?|si', '', $txt);
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are goin
Matt Palermo wrote:
> I realize that I can use the strip_tags function to remove HTML. But I
> don't want to remove HTML tags. I just want to make sure all open HTML
> tags
> are closed. For example if they user submits HTML with a tag and
> never closes it, then the rest of the page will look
Matt Palermo wrote:
I realize that I can use the strip_tags function to remove HTML. But I
don't want to remove HTML tags. I just want to make sure all open HTML tags
are closed. For example if they user submits HTML with a tag and
never closes it, then the rest of the page will look screwed
On Fri, 10 Dec 2004 17:38:13 -0500, John Holmes
<[EMAIL PROTECTED]> wrote:
> strip_tags() is a rather worthless function, if you ask me.
strip_tags() is pretty handy when scraping another site. Like the
other day I was asked to grab some links off a site where there was no
RSS feed available.. I
I realize that I can use the strip_tags function to remove HTML. But I
don't want to remove HTML tags. I just want to make sure all open HTML tags
are closed. For example if they user submits HTML with a tag and
never closes it, then the rest of the page will look screwed up. I still
want
> From: "Richard Lynch" <[EMAIL PROTECTED]>
> Matt Palermo wrote:
> > but just make sure that ending
> > tags exist, so it doesn't screw up the rest of the page. Strip tags would
> > just wipe out the HTML rather than allowing it and ending it safely.
>
> Strip tags will allow you to wipe out *D
Matt Palermo wrote:
> I would like to leave any HTML in there,
Do you *TRUST* the people typing the HTML to not attack your server, or
others, with cross-site scripting attacks?
If not, go re-read the manual about strip_tags, and pay particular
attention to the second, optional, argument.
> but
I would like to leave any HTML in there, but just make sure that ending
tags exist, so it doesn't screw up the rest of the page. Strip tags would
just wipe out the HTML rather than allowing it and ending it safely.
"Richard Lynch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
Richard Lynch wrote:
Matt Palermo wrote:
I am allowing users to imput HTML code into a textarea. After they input
this, I wany to output their HTML to the browser. In order for the
document
to be safe, I need to close all open HTML tags that have been left open by
the user, along with any open co
Matt Palermo wrote:
> I am allowing users to imput HTML code into a textarea. After they input
> this, I wany to output their HTML to the browser. In order for the
> document
> to be safe, I need to close all open HTML tags that have been left open by
> the user, along with any open comments. Is
On Wed, 8 Dec 2004 22:33:19 -0500, Matt Palermo <[EMAIL PROTECTED]> wrote:
> I am allowing users to imput HTML code into a textarea. After they input
> this, I wany to output their HTML to the browser. In order for the document
> to be safe, I need to close all open HTML tags that have been left
May be you could use a iframe to ensure your own page much safer,
despite show the users' inputs is very dangerous.
-邮件原件-
发件人: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
发送时间: 2004年12月9日 12:26
抄送: [EMAIL PROTECTED]
主题: Re: [PHP] Close all open tags in HTML text
Matt Palermo
Matt Palermo wrote:
I am allowing users to imput HTML code into a textarea. After they input
this, I wany to output their HTML to the browser. In order for the document
to be safe, I need to close all open HTML tags that have been left open by
the user, along with any open comments. Is there
I am allowing users to imput HTML code into a textarea. After they input
this, I wany to output their HTML to the browser. In order for the document
to be safe, I need to close all open HTML tags that have been left open by
the user, along with any open comments. Is there a way to take an HTM
14 matches
Mail list logo