note 126104 added to function.strip-tags

From: Date: Mon, 24 May 2021 17:30:02 +0000
Subject: note 126104 added to function.strip-tags
Groups: php.notes 
Request: Send a blank email to php-notes+get-216422@lists.php.net to get a copy of this message
Note, strip_tags will remove anything looking like a tag - not just tags - i.e. if you have tags in attributes then they may be removed too, e.g. <?php $test='<div a="abc <b>def</b> hij" b="1">x<b>y</b>z</div>'; $echo strip_tags($test, "<div><b>"); will result in <div a="abc bdef/b hij" b="1">x<b>y</b>z</div> ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 2a02:c7f:dcf5:f400:a187:93bf:f92:7e92) ---- Manual Page -- https://php.net/manual/en/function.strip-tags.php Edit -- https://main.php.net/note/edit/126104 Del: integrated -- https://main.php.net/note/delete/126104/integrated Del: useless -- https://main.php.net/note/delete/126104/useless Del: bad code -- https://main.php.net/note/delete/126104/bad+code Del: spam -- https://main.php.net/note/delete/126104/spam Del: non-english -- https://main.php.net/note/delete/126104/non-english Del: in docs -- https://main.php.net/note/delete/126104/in+docs Del: other reasons-- https://main.php.net/note/delete/126104 Reject -- https://main.php.net/note/reject/126104 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#216422) next »