note 49119 deleted from function.strip-tags by danbrown

From: Date: Sun, 17 May 2009 16:04:26 +0000
Subject: note 49119 deleted from function.strip-tags by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154754@lists.php.net to get a copy of this message
Note Submitter: dumb at coder dot com ---- /* 15Jan05 Within <textarea>, Browsers auto render & display certain "HTML Entities" and "HTML Entity Codes" as characters: &lt; shows as < -- &amp; shows as & -- etc. Browsers also auto change any "HTML Entity Codes" entered in a <textarea> into the resultant display characters BEFORE UPLOADING. There's no way to change this, making it difficult to edit html in a <textarea> "HTML Entity Codes" (ie, use of &#60 to represent "<", &#38 to represent "&" &#160 to represent "&nbsp;") can be used instead. Therefore, we need to "HTML-Entitize" the data for display, which changes the raw/displayed characters into their HTML Entity Code equivalents before being shown in a <textarea>. how would I get a textarea to contain "&lt;" as a literal string of characters and not have it display a "<" &amp;lt; is indeed the correct way of doing that. And if you wanted to display that, you'd need to use &amp;amp;lt;'. That's just how HTML entities work. htmlspecialchars() is a subset of htmlentities() the reverse (ie, changing html entity codes into displayed characters, is done w/ html_entity_decode() google on ns_quotehtml and see http://aolserver.com/docs/tcl/ns_quotehtml.html see also http://www.htmlhelp.com/reference/html40/entities/ */

« previous php.notes (#154754) next »