We should not be escaping when we build a variable, but when we output it at the end. We call this 'escaping late.'

This commit is contained in:
Savvas Hadjigeorgiou
2021-11-05 13:42:23 +02:00
parent 8074b59639
commit 82dc48317c
2 changed files with 8 additions and 8 deletions

View File

@@ -252,11 +252,11 @@ class SP_Admin_Settings {
if ( $tip && in_array( $value['type'], array( 'checkbox' ) ) ) {
$tip = '<p class="description">' . esc_attr( $tip ) . '</p>';
$tip = '<p class="description">' . $tip . '</p>';
} elseif ( $tip ) {
$tip = '<i class="dashicons dashicons-editor-help sp-desc-tip" title="' . esc_attr( $tip ) . '" />';
$tip = '<i class="dashicons dashicons-editor-help sp-desc-tip" title="' . $tip . '" />';
}