Changes between Initial Version and Version 1 of Ticket #51159, comment 4
- Timestamp:
- 11/04/2025 04:12:40 PM (10 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51159, comment 4
initial v1 9 9 ----- 10 10 11 [=#mostly-fine '''1:'''] `esc_ url()` will not "double escape" HTML character references, so if the JSON contains the text `&` it will remain unchanged and decode to a plain `&` in the attribute value instead of being escaped as `&`. It's likely better to use an alternative that always escapes, but `esc_url()` is sufficient for illustration.11 [=#mostly-fine '''1:'''] `esc_attr()` will not "double escape" HTML character references, so if the JSON contains the text `&` it will remain unchanged and decode to a plain `&` in the attribute value instead of being escaped as `&`. It's likely better to use an alternative that always escapes, but `esc_url()` is sufficient for illustration.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)