[wp-trac] [WordPress Trac] #32556: Clarify behaviour of esc_attr() with respect to HTML entities
WordPress Trac
noreply at wordpress.org
Wed Jun 3 13:07:14 UTC 2015
#32556: Clarify behaviour of esc_attr() with respect to HTML entities
--------------------------+----------------------
Reporter: leewillis77 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Formatting | Version:
Severity: normal | Resolution: invalid
Keywords: | Focuses:
--------------------------+----------------------
Comment (by jdgrimes):
> So, I assumed that I should be able to encode the entity myself, and
then apply esc_attr() since esc_attr() advertises that it "will never
double encode entities"
(https://codex.wordpress.org/Function_Reference/esc_attr).
The actual [https://developer.wordpress.org/reference/functions/esc_attr/
inline docs of esc_attr()] make no such claim, this is just another case
of the codex being wrong.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32556#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list