Skip to content
Snippets Groups Projects
Verified Commit a028eba8 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

feat: add wc functions whitelist


Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent 6ba84cfa
No related branches found
No related tags found
No related merge requests found
# Changelog
## [1.3.0] - 2023-12-21
### Added
- Added WooCommerce sanitization and escaping functions to whitelist in security rules.
## [1.2.8] - 2023-09-14
### Added
- Whitelisted some of WooCommerce custom capabilities for sniffs.
......
......@@ -77,6 +77,19 @@
</properties>
</rule>
<!-- Add WooCommerce security functions to whitelist -->
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" type="array" value="wc_clean,wc_sanitize_tooltip,wc_format_decimal,wc_stock_amount,wc_sanitize_permalink,wc_sanitize_textarea" />
</properties>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customEscapingFunctions" type="array" value="wc_help_tip,wc_sanitize_tooltip,wc_selected,wc_kses_notice,wc_esc_json,wc_query_string_form_fields,wc_make_phone_clickable" />
</properties>
</rule>
<!-- Template files should have comment with passed variables. -->
<rule ref="Squiz.Commenting.FileComment">
<include-pattern>*/templates/*</include-pattern>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment