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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
49 - 43 = ?
Subscribe to this entry?

 
 [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-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 03 21:01:24 2020 UTC