[wp-trac] [WordPress Trac] #45850: wp_specialchars_decode not working in 5.0 or later

WordPress Trac noreply at wordpress.org
Sat Sep 7 22:52:41 UTC 2019

#45850: wp_specialchars_decode not working in 5.0 or later
 Reporter:  kailanitish90  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Formatting     |     Version:
 Severity:  normal         |  Resolution:  invalid
 Keywords:                 |     Focuses:
Changes (by SergeyBiryukov):

 * keywords:  needs-patch =>
 * resolution:   => invalid
 * status:  new => closed
 * component:  General => Formatting
 * milestone:  Awaiting Review =>


 Hi there, welcome to WordPress Trac!

 Thanks for the ticket, sorry it took so long for someone to get back to

 In my testing, `wp_specialchars_decode()` has never worked with `&#8217`,
 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 `&#8217`
 ([https://www.fileformat.info/info/unicode/char/2019/index.htm right
 single quotation mark]).

 I don't see a bug here. If you need a function to convert `&#8217` to the
 actual character, then [https://www.php.net/html_entity_decode
 html_entity_decode()] should do that.

Ticket URL: <https://core.trac.wordpress.org/ticket/45850#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list