note 97271 added to function.token-get-all
| From: | paulrobinson at osu1 dot php dot net | Date: | Sun, 11 Apr 2010 14:32:45 +0000 |
| Subject: | note 97271 added to function.token-get-all | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168135@lists.php.net to get a copy of this message | ||
Comment about the code by Dennis Robinson:
One thing to be careful about displaying tokens is that if the text you're scanning contains a
valid redirect HTML it can cause your page to redirect! When displaying I recommend a filter like
the following:
function cleanprint($buffer)
// Because the source file may contain html, we need to sanitize it
return str_replace("<", "<", $buffer);
}
Then use:
echo (cleanprint(token_name_nl($token[0]) . ': "' . $token[1] .
'"<br />'));
----
Server IP: 208.69.120.55
Probable Submitter: 68.34.12.104
----
Manual Page -- http://www.php.net/manual/en/function.token-get-all.php
Edit -- https://master.php.net/note/edit/97271
Del: integrated -- https://master.php.net/note/delete/97271/integrated
Del: useless -- https://master.php.net/note/delete/97271/useless
Del: bad code -- https://master.php.net/note/delete/97271/bad+code
Del: spam -- https://master.php.net/note/delete/97271/spam
Del: non-english -- https://master.php.net/note/delete/97271/non-english
Del: in docs -- https://master.php.net/note/delete/97271/in+docs
Del: other reasons-- https://master.php.net/note/delete/97271
Reject -- https://master.php.net/note/reject/97271
Search -- https://master.php.net/manage/user-notes.php