Changeset 3405134
- Timestamp:
- 11/28/2025 12:08:38 PM (4 months ago)
- Location:
- wp-showhide/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-showhide.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-showhide/trunk/readme.txt
r2949751 r3405134 1 1 # WP-ShowHide 2 2 Contributors: GamerZ 3 Donate link: http ://lesterchan.net/site/donation/3 Donate link: https://lesterchan.net/site/donation/ 4 4 Tags: show, hide, content, visibility, press release, toggle 5 5 Requires at least: 3.0 6 Tested up to: 6. 37 Stable tag: trunk6 Tested up to: 6.8 7 Stable tag: 1.06 8 8 9 9 Allows you to embed content within your blog post via WordPress ShortCode API and toggling the visibility of the content via a link. … … 58 58 59 59 ## Changelog 60 ### Version 1.06 61 * FIXED: esc_html() for more text to prevent XSS 62 60 63 ### Version 1.05 61 64 * FIXED: esc_attr type attributes to prevent XSS -
wp-showhide/trunk/wp-showhide.php
r2845414 r3405134 4 4 Plugin URI: https://lesterchan.net/portfolio/programming/php/ 5 5 Description: Allows you to embed content within your blog post via WordPress ShortCode API and toggling the visibility of the content via a link. By default the content is hidden and user will have to click on the "Show Content" link to toggle it. Similar to what Engadget is doing for their press releases. Example usage: <code>[showhide type="pressrelease"]Press Release goes in here.[/showhide]</code> 6 Version: 1.0 56 Version: 1.06 7 7 Author: Lester 'GaMerZ' Chan 8 8 Author URI: https://lesterchan.net … … 12 12 */ 13 13 14 /* Copyright 202 3Lester Chan (email : lesterchan@gmail.com)14 /* Copyright 2025 Lester Chan (email : lesterchan@gmail.com) 15 15 16 16 This program is free software; you can redistribute it and/or modify … … 74 74 75 75 // Format HTML Output 76 $output = '<div id="' . esc_attr( $attributes['type'] ) . '-link-' . $post_id . '" class="sh-link ' . esc_attr( $attributes['type'] ) . '-link ' . $hidden_class .'"><a href="#" onclick="showhide_toggle(\'' . esc_js( $attributes['type'] ) . '\', ' . $post_id . ', \'' . esc_js( $more_text ) . '\', \'' . esc_js( $less_text ) . '\'); return false;" aria-expanded="' . $hidden_aria_expanded .'"><span id="' . esc_attr( $attributes['type'] ) . '-toggle-' . $post_id . '">' . $more_text. '</span></a></div>';76 $output = '<div id="' . esc_attr( $attributes['type'] ) . '-link-' . $post_id . '" class="sh-link ' . esc_attr( $attributes['type'] ) . '-link ' . $hidden_class .'"><a href="#" onclick="showhide_toggle(\'' . esc_js( $attributes['type'] ) . '\', ' . $post_id . ', \'' . esc_js( $more_text ) . '\', \'' . esc_js( $less_text ) . '\'); return false;" aria-expanded="' . $hidden_aria_expanded .'"><span id="' . esc_attr( $attributes['type'] ) . '-toggle-' . $post_id . '">' . esc_html( $more_text ). '</span></a></div>'; 77 77 $output .= '<div id="' . esc_attr( $attributes['type'] ) . '-content-' . $post_id . '" class="sh-content ' . esc_attr( $attributes['type'] ) . '-content ' . $hidden_class . '" style="' . $hidden_css . '">' . do_shortcode( $content ) . '</div>'; 78 78
Note: See TracChangeset
for help on using the changeset viewer.