Opened 8 years ago
Closed 7 years ago
#45850 closed defect (bug) (invalid)
wp_specialchars_decode not working in 5.0 or later
| Reported by: | kailanitish90 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Formatting | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
The wp_specialchars_decode not working when we get the content from the DB and put it to the csv file.
Step to generate:
- add new page page.
- Enter the title with "'"(apostrophe) like "Bachelor's Degree's"
- Get the post title on coding side and put into the CSV file.
- The "'"(apostrophe) will be display as a html code(’).
Change History (5)
This ticket was mentioned in Slack in #core by kailanitish90. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-committers by kailanitish90. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by kailanitish90. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-comments by kailanitish90. View the logs.
8 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, welcome to WordPress Trac!
Thanks for the ticket, sorry it took so long for someone to get back to you.
In my testing,
wp_specialchars_decode()has never worked with’, neither before nor after 5.0.As a mirror function to
_wp_specialchars(), it deals with a limited set of characters, including&,<,>,", and'.It's not supposed to deal with curly quotes like
’(right single quotation mark).I don't see a bug here. If you need a function to convert
’to the actual character, then html_entity_decode() should do that.