-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post type label being encoded / double encoded... #917
Comments
Not sure what's going to be the best path forward here, since I would much rather have security cleanup measures in place than not. Here's the code used when cleaning up a given label:
I have verified that the UI shows the apostrophe, and does save as the encoded version in the database. Not sure where the With the |
Hey @tw2113 thanks for the quick feedback, I'm away for a couple of days but I'm going to retest this later this week. I'm almost certain it was coming out double encoded (I got this reported from a user initially), so I'm going to try to recreate this and provide clearer steps. |
Noted, thanks. |
@rmorse did you ever get this figured out, or is it still presenting some problems? |
Hey @tw2113 , this issue was still presenting last time I checked, unfortunately I had to leave this alone for now but I think I'll revisit it in a couple of months. |
I'll leave the issue open for the moment then. |
Hey WebDevStudios! Long time user of your plugin :)
We develop another plugin, which lists post types, and we're having trouble with post types with special characters created by your plugin, which means when we output the labels, it looks like this (the second option is CPT UI post type)
What we've noticed:
' Special
(notice the apostrophe at the beginning)get_post_types()
' Special
' Special
' Special
To verify WP behaviour, I tested registering a post type using the WP function register_post_type(), for example:
And when we look at the label of this in a
get_post_types()
call, it looks like this:' Special
To work around this we'd have to double
entity_decode()
post type labels generated by this plugin, which I don't think is a good idea (especially if someone purposely wanted some special chars to show, unlikely but possible).Also I think whenever we see anything double encoded we've likely run into a bug.
Thanks
The text was updated successfully, but these errors were encountered: