note 52186 deleted from function.htmlspecialchars by cmb

From: Date: Sun, 27 Oct 2019 09:16:52 +0000
Subject: note 52186 deleted from function.htmlspecialchars by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212848@lists.php.net to get a copy of this message
Note Submitter: took ---- The Algo from donwilson at gmail dot com to reverse the action of htmlspecialchars(), edited for germany: function unhtmlspecialchars( $string ) { $string = str_replace ( '&amp;', '&', $string ); $string = str_replace ( '&#039;', '\'', $string ); $string = str_replace ( '&quot;', '"', $string ); $string = str_replace ( '&lt;', '<', $string ); $string = str_replace ( '&gt;', '>', $string ); $string = str_replace ( '&uuml;', 'ü', $string ); $string = str_replace ( '&Uuml;', 'Ü', $string ); $string = str_replace ( '&auml;', 'ä', $string ); $string = str_replace ( '&Auml;', 'Ä', $string ); $string = str_replace ( '&ouml;', 'ö', $string ); $string = str_replace ( '&Ouml;', 'Ö', $string ); return $string; }

« previous php.notes (#212848) next »