diff --git a/admin/options-admin.php b/admin/options-admin.php index c73f3f6..9063af8 100644 --- a/admin/options-admin.php +++ b/admin/options-admin.php @@ -275,7 +275,7 @@ public function support_text() { */ private function input_desc( $args ) { if ( isset( $args['desc'] ) ) { - echo '
' . esc_html( $args['desc'] ) . '
'; + echo '' . wp_kses_post( $args['desc'] ) . '
'; } } diff --git a/readme.txt b/readme.txt index bda2133..2b954b6 100644 --- a/readme.txt +++ b/readme.txt @@ -75,9 +75,10 @@ No, there is no built-in WooCommerce integration. You can track posts and pages == Screenshots == -1. The Clicky WordPress plugin settings panel. -2. The Clicky metabox on posts and pages. -3. The stats indicator on the WordPress Toolbar. +1. The Clicky settings page: basic settings. +2. The Clicky settings page: advanced settings and outbound link patterns. +3. The Clicky metabox on posts and pages. +4. The stats indicator on the WordPress Toolbar. == Changelog == @@ -92,6 +93,7 @@ Released November 6th, 2026 * Deprecates the `Yoast\WP\Clicky\admin_footer` action hook in favour of the `clicky/admin_footer` hook. * Renames the `Yoast_Clicky` class to `Clicky_Plugin`. The old name remains available as an alias. * Removes the translation promo module and its unprotected dismiss handler, and links to the plugin's translation project on translate.wordpress.org from the settings page instead. +* Fixes the setting descriptions on the Advanced settings tab, which showed HTML tags such as `` and `` as text.
= 2.0 =
diff --git a/svn-assets/screenshot-1.png b/svn-assets/screenshot-1.png
index d757292..6aab56a 100644
Binary files a/svn-assets/screenshot-1.png and b/svn-assets/screenshot-1.png differ
diff --git a/svn-assets/screenshot-2.png b/svn-assets/screenshot-2.png
index d1c4632..5f96d3a 100644
Binary files a/svn-assets/screenshot-2.png and b/svn-assets/screenshot-2.png differ
diff --git a/svn-assets/screenshot-3.png b/svn-assets/screenshot-3.png
index 0e8460e..d1c4632 100644
Binary files a/svn-assets/screenshot-3.png and b/svn-assets/screenshot-3.png differ
diff --git a/svn-assets/screenshot-4.png b/svn-assets/screenshot-4.png
new file mode 100644
index 0000000..0e8460e
Binary files /dev/null and b/svn-assets/screenshot-4.png differ
diff --git a/tests/options-admin-test.php b/tests/options-admin-test.php
index 344c61d..450dedf 100644
--- a/tests/options-admin-test.php
+++ b/tests/options-admin-test.php
@@ -156,6 +156,27 @@ public function test_input_text() {
self::$class_instance->input_text( $this->test_args );
}
+ /**
+ * Tests that a field description renders its allowed HTML, and strips disallowed HTML.
+ *
+ * @covers Clicky_Options_Admin::input_text
+ * @covers Clicky_Options_Admin::input_desc
+ *
+ * @return void
+ */
+ public function test_input_text_description_allows_safe_html() {
+ $args = $this->test_args;
+ $args['desc'] = 'For instance: /out/, really.';
+
+ ob_start();
+ self::$class_instance->input_text( $args );
+ $output = ob_get_clean();
+
+ // What kses leaves of the script tag's contents differs per WordPress version, so only check the tags.
+ $this->assertStringContainsString( 'For instance: /out/, really.', $output );
+ $this->assertStringNotContainsString( '