php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33037 English : Example Bad output
Submitted: 2005-05-16 03:52 UTC Modified: 2005-06-18 04:03 UTC
From: jsgoupil@php.net Assigned:
Status: Closed Package: Livedocs problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2005-05-16 03:52 UTC] jsgoupil@php.net
Description:
------------
reference/strings/functions/htmlspecialchars-decode.html

Ok, look at the example in livedocs what it outputs..., the output is the same... (check example too).
I don't really know if it is a doc bug or a livedocs bug.
Feel free to redirect this bug to Livedocs...

Perhaps the output will be great on php.net, i don't know ?!

Expected result:
----------------
<?php
$str = '<p>this -&gt; &quot;</p>';

echo htmlspecialchars_decode($str);

// notez ici que les guillemets ne sont pas convertis
echo htmlspecialchars_decode($str, ENT_NOQUOTES);
?> 

<p>this -> "</p>
<p>this -> &quot;</p>

Actual result:
--------------
<?php
$str = '<p>this -&gt; "</p>';

echo htmlspecialchars_decode($str);

// notez ici que les guillemets ne sont pas convertis
echo htmlspecialchars_decode($str, ENT_NOQUOTES);
?> 

<p>this -> "</p>
<p>this -> "</p>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-16 16:28 UTC] nlopess@php.net
Its a livedocs problem.
Could you please try my ancient patch mentioned in #30440 ?
 [2005-05-17 00:56 UTC] jsgoupil@php.net
I'm already running the patch mentionned in #30440
http://livedocs.aborla.net/patch.php?id=entities
Moreover, i wrote a comment into this bug.

I applied it a long time ago and, if I remember, one of the pattern didn't match, so Ive corrected all files by hand.


These lines were removed :

-$GLOBALS['special'] = array('gt' => 1,'lt' => 1,'quot' => 1,'amp' => 1);
-
 function handle_include($node) 
 {
 	global $current_page;
 
 	$ref = $node->attributes['ref'];
 
-	/* Special HTML entities */
-	if (isset($GLOBALS['special'][$ref])) {
-		return '&' . $ref . ';';
-	}
-
 [2005-05-24 01:00 UTC] phpdoc at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-05-26 19:25 UTC] nlopess@php.net
leave it open for further investigation.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Apr 08 14:01:26 2020 UTC