note 83858 added to function.strip-tags

From: Date: Sun, 15 Jun 2008 22:58:44 +0000
Subject: note 83858 added to function.strip-tags
Groups: php.notes 
Request: Send a blank email to php-notes+get-140481@lists.php.net to get a copy of this message
Remember sometimes with regex it's easier to list what you want to keep instead of everything you do not want. Not to mention this makes it easier on the server. With html attributes there may only be a select few you would want to keep. Rather than an array that says $trash = array('a','b','d','f','g'); You could use $keep = array('c','e'); Simply remember your ^not operator in your final regex. ---- Server IP: 69.147.83.197 Probable Submitter: 99.145.84.106 ---- Manual Page -- http://www.php.net/manual/en/function.strip-tags.php Edit -- https://master.php.net/note/edit/83858 Del: integrated -- https://master.php.net/note/delete/83858/integrated Del: useless -- https://master.php.net/note/delete/83858/useless Del: bad code -- https://master.php.net/note/delete/83858/bad+code Del: spam -- https://master.php.net/note/delete/83858/spam Del: non-english -- https://master.php.net/note/delete/83858/non-english Del: in docs -- https://master.php.net/note/delete/83858/in+docs Del: other reasons-- https://master.php.net/note/delete/83858 Reject -- https://master.php.net/note/reject/83858 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140481) next »