php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55547 Undocumented flags for htmlentities()
Submitted: 2011-08-31 06:45 UTC Modified: 2011-09-17 11:38 UTC
From: stas@php.net Assigned: nikic (profile)
Status: Closed Package: Strings related
PHP Version: 5.4.0alpha3 OS: *
Private report: No CVE-ID: None
 [2011-08-31 06:45 UTC] stas@php.net
Description:
------------
Following flags exist for htmlentities:


	REGISTER_LONG_CONSTANT("HTML_SPECIALCHARS", HTML_SPECIALCHARS, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("HTML_ENTITIES", HTML_ENTITIES, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_COMPAT", ENT_COMPAT, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_QUOTES", ENT_QUOTES, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_NOQUOTES", ENT_NOQUOTES, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_IGNORE", ENT_IGNORE, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_SUBSTITUTE", ENT_SUBSTITUTE, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_DISALLOWED", ENT_DISALLOWED, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_HTML401", ENT_HTML401, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_XML1", ENT_XML1, CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_XHTML", ENT_XHTML, 
CONST_PERSISTENT|CONST_CS);
	REGISTER_LONG_CONSTANT("ENT_HTML5", ENT_HTML5, 
CONST_PERSISTENT|CONST_CS);

Only four of them are documented. 


Expected result:
----------------
All flags documented ;)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-17 11:32 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&revision=316908
Log: Fix Doc Bug #55547: Undocumented flags for htmlentities()
 [2011-09-17 11:38 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2011-09-17 11:38 UTC] nikic@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

===

I updated the flags list for htmlentities and htmlspecialchars.

I though did not add the first two flags (HTML_SPECIALCHARS and HTML_ENTITIES). They don't seem to have any effect / are used only internally. Maybe they were added accidentally?
 [2011-09-17 11:45 UTC] nikic@php.net
Ah, the HTML_ constants are for get_html_translation_table, not the htmlspecialchars / htmlentities function flags.
 [2011-09-17 12:08 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&revision=316909
Log: Followup to Doc Bug #55547 (Undocumented flags for htmlentities()): Adjusted initializers and changelog.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC