Re: Bug #15535 Updated: Un-HTML-Entities

From: Date: Wed, 17 Apr 2002 07:18:01 +0000
Subject: Re: Bug #15535 Updated: Un-HTML-Entities
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-82882@lists.php.net to get a copy of this message
cynic@php.net wrote:
 ID:               15535
 Updated by:       cynic@php.net
 Reported By:      klonx@gmx.net
 Status:           Closed
 Bug Type:         Feature/Change Request
Operating System: Win2000
 PHP Version:      4.1.1
New Comment: Although... I don't see why there shouldn't be unhtmlentities() or whatever.
2 person wrote the function. I vote +1, few others vote for -1. I also do not understand why others do not prefer to have consistency like If inverse-conversion is possible, it's better to have one. It's not a matter of easy to write, etc, issue. It's a basic best practice to follow, IMO. (PHP has many inconsistency, anyway!?) -- Yasuo Ohgaki
Previous Comments: ------------------------------------------------------------------------ [2002-04-17 01:13:38] cynic@php.net Go read the get_html_translation_table() manual page. ------------------------------------------------------------------------ [2002-04-17 01:08:04] klonx@gmx.net Sorry i didn't know where to post first, My Comment is ^above^ ! ------------------------------------------------------------------------ [2002-04-17 01:02:06] klonx@gmx.net I didn't get what i want with Derick's idea. My original String was: Schlenger & Meilhamer and after the procedure with: $trans = get_html_translation_table(HTML_ENTITIES); $str = "Schlenger & Meilhamer"; echo strtr($str, $trans); This is what i get: Schlenger & Meilhamer what i wanted to get: Schlenger & Meilhamer So, This does not work like i want it to. Regards, Maximilian ------------------------------------------------------------------------ [2002-02-13 06:54:47] derick@php.net I'm closing this, because you can do this: $trans = get_html_translation_table(HTML_ENTITIES); $str = "Hallo & <Frau> & Krämer" $original = strtr($str, $trans); IMO, this does not warrant a new function. See also: http://www.php.net/manual/en/function.get-html-translation-table.php Derick ------------------------------------------------------------------------ [2002-02-13 06:51:01] wez@php.net I will look into it. I'm not sure about the name though. html_entity_decode($string) ? --Wez. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at
    http://bugs.php.net/15535


« previous php.dev (#82882) next »