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)
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
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
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:
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
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
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().
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
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
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
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
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
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.
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,
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
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
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
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
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
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
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
]
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
-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
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
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
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
46 matches
Mail list logo