Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin/options-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function support_text() {
*/
private function input_desc( $args ) {
if ( isset( $args['desc'] ) ) {
echo '<p class="description">' . esc_html( $args['desc'] ) . '</p>';
echo '<p class="description">' . wp_kses_post( $args['desc'] ) . '</p>';
}
}

Expand Down
8 changes: 5 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ==

Expand All @@ -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 `<em>` and `<code>` as text.

= 2.0 =

Expand Down
Binary file modified svn-assets/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified svn-assets/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified svn-assets/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added svn-assets/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions tests/options-admin-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: <code>/out/</code>, <em>really</em>.<script>alert(1)</script>';

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( '<p class="description">For instance: <code>/out/</code>, <em>really</em>.', $output );
$this->assertStringNotContainsString( '<script', $output );
}

/**
* Tests whether a proper checkbox input field is generated.
*
Expand Down
Loading