Closed jrfnl closed 1 year ago
Until that this is how to add that function.
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customEscapingFunctions" type="array">
<element value="esc_xml"/>
</property>
</properties>
</rule>
Looks like the I10n variants still aren't available (per WP 6.3).
Trac ticket about the I10n functions: https://core.trac.wordpress.org/ticket/50551
WP 5.5 will introduce a new
esc_xml()
escaping function.At a later point in time (not in WP 5.5), it is expected that the I18n variants
esc_xml__()
andesc_xml_e()
will be added.The WPCS sniffs which examine output for being escaped should be updated to allow for escaping using
esc_xml()
.Note: as this function won't be available until WP 5.5, we may need to take the minimum supported WP version into account when sniffing this for the time being.
Ref: https://make.wordpress.org/core/2020/07/21/new-esc_xml-function-in-wordpress-5-5/