note 48364 added to function.strip-tags
| From: | eric at direnetworks dot com | Date: | Tue, 21 Dec 2004 02:36:59 +0000 |
| Subject: | note 48364 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-82105@lists.php.net to get a copy of this message | ||
the strip_tags() function in both php 4.3.8 and 5.0.2 (probably many more, but these are the only 2
versions I tested with) have a max tag length of 1024. If you're trying to process a tag over
this limit, strip_tags will not return that line (as if it were an illegal tag). I noticed this
problem while trying to parse a paypal encrypted link button (<input type="hidden"
name="encrypted" value="encryptedtext">, with <input> as an allowed
tag), which is 2702 characters long. I can't really think of any workaround for this other
than parsing each tag to figure out the length, then only sending it to strip_tags() if its under
1024, but at that point, I might as well be stripping the tags myself.
----
Manual Page -- http://www.php.net/manual/en/function.strip-tags.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48364
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48364&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48364&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48364&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48364&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48364&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48364&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48364&report=yes
Search -- http://master.php.net/manage/user-notes.php