#12178 closed defect (bug) (invalid)
esc_html() doesn't encode '&' characters
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.0 |
| Component: | Formatting | Keywords: | 2nd-opinion |
| Focuses: | Cc: |
Description
var_dump(htmlspecialchars('«')); // string(11) "«"
var_dump(esc_html('«')); // string(7) "«"
Change History (4)
Note: See
TracTickets for help on using
tickets.
You mean it doesn't double-encode it? This is by design, if something needs double-encoding use
htmlspecialchars.