Bug #68728 [Com]: htmlentities() does not convert ' '/" to /" with ENT_HTML5
Edit report at https://bugs.php.net/bug.php?id=68728&edit=1
ID: 68728
Comment by: ppaisndud at gmail dot com
Reported by: yohgaki@php.net
Summary: htmlentities() does not convert ' '/" to
/" with ENT_HTML5
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This line causes this,
https://github.com/php/php-src/blob/master/ext/standard/html.c#L1316-L1318
probably can be moved to verified if it is a error.
Previous Comments:
------------------------------------------------------------------------
[2015-01-03 01:25:53] yohgaki@php.net
Description:
------------
' ' space is   and it's in conversion tables.
localhost:Documents yohgaki$ php -r 'print_r(get_html_translation_table(ENT_HTML5));'
Array
(
["] => "
[&] => &
[<] => <
[>] => >
[Â ] =>
[¡] => ¡
but ' '/" is not converted to /" with htmlentities() at least.
" is converted to " with additional ENT_QUOTES flag. However, htmlentities() should
convert all chars according to the conversion table.
Test script:
---------------
php -r 'echo htmlentities("\" <>?&/", ENT_HTML5);'
Expected result:
----------------
" <>?&/
Actual result:
--------------
" <>?&/
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68728&edit=1
Thread (4 messages)