Opened 4 years ago
Closed 4 years ago
#45850 closed defect (bug) (invalid)
wp_specialchars_decode not working in 5.0 or later
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | |
Focuses: | Cc: |
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.
4 years ago
This ticket was mentioned in Slack in #core-committers by kailanitish90. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by kailanitish90. View the logs.
4 years ago
This ticket was mentioned in Slack in #core-comments by kailanitish90. View the logs.
4 years ago
Note: See
TracTickets for help on using
tickets.
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.