[wp-trac] [WordPress Trac] #55399: esc_xml() removes valid XML input ( input that is empty() )
WordPress Trac
noreply at wordpress.org
Mon Apr 11 19:58:18 UTC 2022
#55399: esc_xml() removes valid XML input ( input that is empty() )
-------------------------------------------------+-------------------------
Reporter: rumpel2116 | Owner: pbiron
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.0
Component: Formatting | Version: 5.5
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
assigned-for-commit |
-------------------------------------------------+-------------------------
Changes (by audrasjb):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"53144" 53144]:
{{{
#!CommitTicketReference repository="" revision="53144"
Formatting: Avoid escaping valid XML values in `esc_xml()`.
This change improves the `esc_xml()` function by replacing two `empty()`
checks with `isset()` to cover values that are not equal to `''` but still
returning `true` when checked with `empty()`, like `'0'`, `0` or `false`.
It also updates the related unit tests accordingly.
Props rumpel2116, pbiron.
Fixes #55399.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55399#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list