php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66513 htmlspecialchars ENT_NOQUOTES documentation
Submitted: 2014-01-19 05:40 UTC Modified: 2014-12-30 10:42 UTC
From: wes dot turner at gmail dot com Assigned:
Status: No Feedback Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wes dot turner at gmail dot com
New email:
PHP Version: OS:

 

 [2014-01-19 05:40 UTC] wes dot turner at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.htmlspecialchars
---

The translations performed are:

* '&' (ampersand) becomes '&'
* '"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
* "'" (single quote) becomes ''' (or ') only when ENT_QUOTES is set.

---
Expected
---
I'm not very good at PHP, but is this how ENT_NOQUOTES works?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-19 05:42 UTC] wes dot turner at gmail dot com
And then:

    ENT_QUOTES	    Will convert both double and single quotes.
    ENT_NOQUOTES     Will leave both double and single quotes unconverted.
 [2014-01-28 22:07 UTC] dsas@php.net
-Status: Open +Status: Feedback
 [2014-01-28 22:07 UTC] dsas@php.net
Yes that is how it works. ENT_NOQUOTES stops either kind of quotes being converted into an entity. ENT_QUOTES is the only option that converts single quotes.

What specifically do you think is worded confusingly?
 [2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 18:01:34 2024 UTC