Re: [PHP] strip_tags

2013-07-21 Thread Matijn Woudt
Op 21 jul. 2013 02:53 schreef Tedd Sperling t...@sperling.com het volgende: On Jul 20, 2013, at 5:34 PM, Frank Arensmeier farensme...@gmail.com wrote: 20 jul 2013 kl. 18:25 skrev Tedd Sperling t...@sperling.com: Hi gang: I've been using $str = strip_tags($str, $allowable)

[PHP] strip_tags

2013-07-20 Thread Tedd Sperling
Hi gang: I've been using $str = strip_tags($str, $allowable) as it is described via the manuals: http://php.net/manual/en/function.strip-tags.php The problem I've found is the tags br and br / are not stripped. How do you strip all tags, but leave some tags (such as b, i, and u -- I

Re: [PHP] strip_tags

2013-07-20 Thread Frank Arensmeier
20 jul 2013 kl. 18:25 skrev Tedd Sperling t...@sperling.com: Hi gang: I've been using $str = strip_tags($str, $allowable) as it is described via the manuals: http://php.net/manual/en/function.strip-tags.php The problem I've found is the tags br and br / are not stripped. How

Re: [PHP] strip_tags

2013-07-20 Thread Tedd Sperling
On Jul 20, 2013, at 5:34 PM, Frank Arensmeier farensme...@gmail.com wrote: 20 jul 2013 kl. 18:25 skrev Tedd Sperling t...@sperling.com: Hi gang: I've been using $str = strip_tags($str, $allowable) as it is described via the manuals:

[PHP] strip_tags

2008-08-12 Thread Philip Thompson
Hi all. If you are sanitizing _POST input for a database by escaping (via mysql_*), is there a reason to use strip_tags()? If so, why and could you provide an example? Thanks, ~Philip innerHTML is a string. The DOM is not a string, it's a hierarchal object structure. Shoving a string

Re: [PHP] strip_tags

2008-08-12 Thread Richard Heyes
If you are sanitizing _POST input for a database by escaping (via mysql_*), is there a reason to use strip_tags()? If so, why and could you provide an example? Not really, as long as you're using something like mysql_real_escape_string(). Though if you're redisplaying it to your users (ie

Re: [PHP] strip_tags

2008-08-12 Thread Philip Thompson
On Aug 12, 2008, at 2:01 PM, Richard Heyes wrote: If you are sanitizing _POST input for a database by escaping (via mysql_*), is there a reason to use strip_tags()? If so, why and could you provide an example? Not really, as long as you're using something like mysql_real_escape_string().

Re: [PHP] strip_tags

2008-08-12 Thread Andrew Ballard
On Tue, Aug 12, 2008 at 2:47 PM, Philip Thompson [EMAIL PROTECTED] wrote: Hi all. If you are sanitizing _POST input for a database by escaping (via mysql_*), is there a reason to use strip_tags()? If so, why and could you provide an example? Thanks, ~Philip The database won't care

Re: [PHP] strip_tags

2008-08-12 Thread Richard Heyes
Actually, yes, the data is likely to be redisplayed to the users on a website. I covered that in my answer. Likely maybe; a certainty no. However, when shoving the data to the browser, I use htmlentities(). Is it recommended to use strip_tags() before sending to htmlentities()? Not unless

Re: [PHP] strip_tags

2008-08-12 Thread Philip Thompson
On Aug 12, 2008, at 2:10 PM, Andrew Ballard wrote: On Tue, Aug 12, 2008 at 2:47 PM, Philip Thompson [EMAIL PROTECTED] wrote: Hi all. If you are sanitizing _POST input for a database by escaping (via mysql_*), is there a reason to use strip_tags()? If so, why and could you provide an

Re: [PHP] strip_tags

2008-08-12 Thread Andrew Ballard
On Tue, Aug 12, 2008 at 4:53 PM, Philip Thompson [EMAIL PROTECTED] wrote: On Aug 12, 2008, at 2:10 PM, Andrew Ballard wrote: On Tue, Aug 12, 2008 at 2:47 PM, Philip Thompson [EMAIL PROTECTED] wrote: Hi all. If you are sanitizing _POST input for a database by escaping (via mysql_*), is

Re: [PHP] strip_tags

2008-08-12 Thread Philip Thompson
On Aug 12, 2008, at 4:11 PM, Andrew Ballard wrote: On Tue, Aug 12, 2008 at 4:53 PM, Philip Thompson [EMAIL PROTECTED] wrote: On Aug 12, 2008, at 2:10 PM, Andrew Ballard wrote: On Tue, Aug 12, 2008 at 2:47 PM, Philip Thompson [EMAIL PROTECTED] wrote: Hi all. If you are sanitizing _POST

Re: [PHP] strip_tags and nl2br

2008-05-21 Thread Chris
James Colannino wrote: Hey everyone, I have a little bit of a quandry. I need to strip HTML tags from user input, but I also need to convert \n's from the textarea elements to br tags so it will display properly in a browser. RTM. Supply the tags you want to keep when you call strip_tags.

Re: [PHP] strip_tags and nl2br

2008-05-21 Thread James Colannino
Chris wrote: RTM. Supply the tags you want to keep when you call strip_tags. $stripped = strip_tags($data, 'br/br'); I can do that, but my question had to do with strip_tags seeming to get rid of \n's, not br tags. This is why I was concerned. If I run strip_tags(), followed by nl2br,

Re: [PHP] strip_tags and nl2br

2008-05-21 Thread Chris
James Colannino wrote: Chris wrote: RTM. Supply the tags you want to keep when you call strip_tags. $stripped = strip_tags($data, 'br/br'); I can do that, but my question had to do with strip_tags seeming to get rid of \n's, not br tags. This is why I was concerned. If I run

Re: [PHP] strip_tags and nl2br

2008-05-21 Thread James Colannino
Chris wrote: Are you sure there are newlines before you run strip_tags? I would assume so, because everything from the textarea runs together in one line when displayed in the browser until filtered through nl2br(). That would suggest to me that there are indeed \n's that are being

Re: [PHP] strip_tags and nl2br

2008-05-21 Thread James Colannino
James Colannino wrote: Chris wrote: Are you sure there are newlines before you run strip_tags? I would assume so, because everything from the textarea runs together in one line when displayed in the browser until filtered through nl2br(). That would suggest to me that there are indeed \n's

[PHP] strip_tags and nl2br

2008-05-20 Thread James Colannino
Hey everyone, I have a little bit of a quandry. I need to strip HTML tags from user input, but I also need to convert \n's from the textarea elements to br tags so it will display properly in a browser. nl2br() works just fine, but if I use strip_tags first, then run nl2br, nl2br won't

[PHP] Strip_tags issue / question

2004-05-01 Thread Dave Carrera
Hi List, I am using stip_tags to return to me just the words contained in a page from my website but what is displayed is some thing like this : --- Output Example --- hello world Why so much space ? --- End - So

RE: [PHP] Strip_tags issue / question

2004-05-01 Thread Dave Carrera
Thanks David, That sorted that out nicely :-) I hope that helps someone else on the list. Dave C -Original Message- From: David Risner [mailto:[EMAIL PROTECTED] Sent: 01 May 2004 14:36 To: Dave Carrera Subject: Re: [PHP] Strip_tags issue / question How about something like

RE: [PHP] strip_tags() Quandry....

2003-05-31 Thread Carl Furst
Message- From: Noah [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 11:03 PM To: CPT John W. Holmes; Carl Furst Cc: [EMAIL PROTECTED] Subject: Re: [PHP] strip_tags() Quandry Hey John; Hey Carl. I've heard this debate before; i.e. regular expressions vs. PHP string formatting functions

Re: [PHP] strip_tags() Quandry....

2003-05-31 Thread Noah
] To: Noah [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, May 30, 2003 7:44 AM Subject: RE: [PHP] strip_tags() Quandry As you can guess, I'm more a fan of the regular expressions myself being primarily a PERL head. However, PHP string functions are useful and convenient (like trim

RE: [PHP] strip_tags() Quandry....

2003-05-31 Thread Carl Furst
PROTECTED] Sent: Friday, May 30, 2003 2:04 PM To: Carl Furst Cc: [EMAIL PROTECTED] Subject: Re: [PHP] strip_tags() Quandry Exactly, Carl. The HTML team data I'm dealing with comes in myriad formats -- nothing is uniform as each school presents their team data differently, not to mention

Re: [PHP] strip_tags() Quandry....

2003-05-30 Thread CF High
Hey Justin. Sorry for the late reply -- got totally wrapped up in utilizing that highly useful bit of reg exp code. Thanks for the heads up; it certainly solved the problem. Unfortunately, or fortunately, new problems have arisen -- time to dive into learning some reg exp syntax Thanks

RE: [PHP] strip_tags() Quandry....

2003-05-30 Thread Carl Furst
life SO much easier. Especially if you are a database massager, oh man the hours I have saved! C. -Original Message- From: Noah [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 12:34 PM To: Carl Furst Subject: Re: [PHP] strip_tags() Quandry Hey Carl. Sorry for the late reply

Re: [PHP] strip_tags() Quandry....

2003-05-30 Thread CPT John W. Holmes
Yes, no problem! Glad it worked out. you may wish to actually study the perlre man page on perl.com. This goes into the most details and talks about how PERL actually EXTENDS shell regular expressions significantly and excellent resource that I have used many many times. I figure since PHP

Re: [PHP] strip_tags() Quandry....

2003-05-30 Thread Noah
functions, let me know. --Noah - Original Message - From: CPT John W. Holmes [EMAIL PROTECTED] To: Carl Furst [EMAIL PROTECTED]; Noah [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, May 29, 2003 10:18 AM Subject: Re: [PHP] strip_tags() Quandry Yes, no problem! Glad

[PHP] strip_tags() Quandry....

2003-05-27 Thread CF High
Hey all. I've got a chunk of HTML text I'd like to format for insertion into our mySql db. Let's say $html_string equals the following: tr td1/td tdBardo, Jesse/td tdS/td tdA/td tdAndover, MA/td /tr To setup this chunk of text for insertion I first use

Re: [PHP] strip_tags() Quandry....

2003-05-27 Thread Justin French
on 28/05/03 2:56 PM, CF High ([EMAIL PROTECTED]) wrote: I've got a chunk of HTML text I'd like to format for insertion into our mySql db. Let's say $html_string equals the following: tr td1/td tdBardo, Jesse/td tdS/td tdA/td tdAndover, MA/td /tr To setup this chunk of text for

[PHP] Strip_Tags @ php 4.3

2003-01-27 Thread George E. Papadakis
Hello, Has anyone noticed strange behaviour in strap_tags @ php 4.3? We did upgrade to the latest snap yet the problem remains. For some reason strip_tags acts weird.. -- georgep -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strip_Tags @ php 4.3

2003-01-27 Thread Philip Olson
On Mon, 27 Jan 2003, George E. Papadakis wrote: Hello, Has anyone noticed strange behaviour in strap_tags @ php 4.3? We did upgrade to the latest snap yet the problem remains. For some reason strip_tags acts weird.. Please be specific with a short self-contained example that demonstrates

[PHP] strip_tags

2002-07-01 Thread BB
I'm having a problem using strip_tags. When I try and run a table through strip_tags with the following vars, it looses everything after the first cell with content in, i.e: nothing after the first cell is returned, not even a /td can anyone help? is this a PHP bug? -- PHP General Mailing

Re: [PHP] strip_tags

2002-07-01 Thread Analysis Solutions
On Mon, Jul 01, 2002 at 12:35:53PM +0100, BB wrote: I'm having a problem using strip_tags. Sounds like you're using it wrong. Re-read http://www.php.net/manual/en/function.strip-tags.php. Then fix your code accordingly. If that doesn't work, post a _sample_ of your HTML and PHP that don't

Re: [PHP] strip_tags

2002-07-01 Thread BB
OK, this is a 3x3 table pasted in from word! This is the raw HTML TABLE style=BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt

Re: [PHP] strip_tags

2002-07-01 Thread Erik Price
On Monday, July 1, 2002, at 11:09 AM, BB wrote: OK, this is a 3x3 table pasted in from word! It is against the rules to post HTML code generated by Microsoft Word. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List

Re: [PHP] strip_tags

2002-07-01 Thread Analysis Solutions
On Mon, Jul 01, 2002 at 04:09:04PM +0100, BB wrote: Dude, c'mon! I asked for a _sample_ for a reason. First, I didn't want to have to wade through a ton of HTML. Second, it'd help you isolate the problem so you could formulate an accurate question and/or figure out the answer for yourself.

Re: [PHP] strip_tags

2002-07-01 Thread BB
Well, this is the solution we are providing, I found the error to be because word is such a wonderful program it puts XML in the middle of HTML, so I preg'd that out and all was good again! Thanks anyway peeps Analysis Solutions [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

[PHP] strip_tags bug ?

2002-06-07 Thread Mikhail Avrekh
Hello, There seem to be a couple of bugs in the strip_tags() function, one minor (or at least I know how to circumvent it) and one more serious. The minor problem is that it treats a not-equals sign, , as an empty tag and strips it, unless it's explicitely set as an allowed tag (as in

RE: [PHP] strip_tags bug ?

2002-06-07 Thread David Freeman
The minor problem is that it treats a not-equals sign, , as an empty tag and strips it, unless it's explicitely ...etc... Except, of course, that when writing html you are supposed to use entities for any valid html stuff - ie. Use gt; and $lt; for and so on. As you should also use

RE: [PHP] strip_tags bug ?

2002-06-07 Thread Mikhail Avrekh
I realize the importance of using valid html stuff. Here, however, I'm trying to validate *user input*, not fix up my own HTML pages. And I have no way of teaching the users to say lt; and gt; instead of and when they fill out their forms. On Sat, 8 Jun 2002, David Freeman wrote: The

[PHP] strip_tags() problem

2002-04-04 Thread Ryan Govostes
The following simple code does not function: $html = include(http://www.yahoo.com;); $text = strip_tags($html); echo $text; I've tried several variations of the above, such as using preg_replace() instead of strip_tags() and readfile() instead of include(), but it does not work at all, no

RE: [PHP] strip_tags() problem

2002-04-04 Thread Rick Emery
you need to open and process yahoo with file statements, not include please read the PHP manual... -Original Message- From: Ryan Govostes [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 2:44 PM To: PHP People Subject: [PHP] strip_tags() problem The following simple code

RE: [PHP] strip_tags() problem

2002-04-04 Thread Rodolfo Gonzalez
-Original Message- From: Ryan Govostes [mailto:[EMAIL PROTECTED]] Subject: [PHP] strip_tags() problem I've tried several variations of the above, such as using preg_replace() instead of strip_tags() and readfile() instead of include(), but it does not work at all, no matter what

Re: [PHP] strip_tags()

2001-04-02 Thread Richard Lynch
ot; [EMAIL PROTECTED] Newsgroups: php.general Sent: Thursday, March 29, 2001 9:45 PM Subject: [PHP] strip_tags() I have a document with !--ktalk newpost-- in it, which I want to KEEP in the document. (it's being read into $fp). How can I use strip_tags() to remove all tags, but keep !--ktalk newpo

[PHP] strip_tags()

2001-03-29 Thread David Balatero
I have a document with !--ktalk newpost-- in it, which I want to KEEP in the document. (it's being read into $fp). How can I use strip_tags() to remove all tags, but keep !--ktalk newpost-- in the document? I tried $filedata = strip_tags($filedata, "!--ktalk newpost--"); Then re-writing it to

Re: [PHP] strip_tags ?

2001-01-10 Thread Richard Lynch
Wednesday, January 10, 2001 1:50 PM Subject: [PHP] strip_tags ? Is there a list anywhere of hte tags this function will strip, I couldn't find it in the php manual? I want to know if there are any that might be left ou