Changeset 3207795
- Timestamp:
- 12/13/2024 08:33:49 PM (14 months ago)
- Location:
- the-permalinker
- Files:
-
- 6 added
- 2 edited
-
tags/1.9.0 (added)
-
tags/1.9.0/readme.txt (added)
-
tags/1.9.0/screenshot-1.png (added)
-
tags/1.9.0/screenshot-2.png (added)
-
tags/1.9.0/screenshot-3.png (added)
-
tags/1.9.0/the-permalinker.php (added)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/the-permalinker.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
the-permalinker/trunk/readme.txt
r2945667 r3207795 36 36 37 37 == Changelog == 38 39 = 1.9.0 = 40 * Added important security enhancements for escaping URLs and HTML content to prevent XSS and other potential security holes 41 * Some legacy output may be affected as we are now escaping URLs and HTML attributes. 42 * Content inside of the shortcode should _not_ be escaped as we want to preserve any HTML within that shortcode content/anchor text. 38 43 39 44 = 1.8.0 = -
the-permalinker/trunk/the-permalinker.php
r2805311 r3207795 5 5 Plugin URI: http://theandystratton.com/2009/the-permalinker-wordpress-plugin-dynamic-permalinks 6 6 Author URI: http://theandystratton.com 7 Version: 1. 8.17 Version: 1.9.0 8 8 Description: Add dynamically created permalinks using the short code tag [permalink] and output dynamic links to your current template directory using short code [template_uri]. <a href="options-general.php?page=permalinker_help">Need help?</a> 9 9 */ … … 28 28 if ( !empty($content) ) 29 29 { 30 $output = '<a href="' . \ get_permalink( $id ) . \esc_attr( $append) . '"';30 $output = '<a href="' . \esc_url( \get_permalink( $id ) . \esc_attr( $append ) ) . '"'; 31 31 32 32 if ( !empty( $target ) ) 33 $output .= ' target="' . $target. '"';33 $output .= ' target="' . \esc_attr( $target ) . '"'; 34 34 35 $output .= ' class="permalinker_link ' . $class. '"';35 $output .= ' class="permalinker_link ' . \esc_attr( $class ) . '"'; 36 36 37 37 if ( !empty($rel) ) 38 $output .= ' rel="' . $rel. '"';38 $output .= ' rel="' . \esc_attr( $rel ) . '"'; 39 39 40 40 $output .= '>' . \str_replace( '%post_title%', \get_the_title( $id ), $content ) . '</a>'; … … 42 42 else 43 43 { 44 $output = \ get_permalink( $id ) . $append;44 $output = \esc_url( \get_permalink( $id ) . \esc_attr( $append ) ); 45 45 } 46 46 return $output; … … 51 51 // 52 52 function permalinker_template_uri( $atts, $content = null ) { 53 return \ get_template_directory_uri();53 return \esc_url( \get_template_directory_uri() ); 54 54 } 55 55
Note: See TracChangeset
for help on using the changeset viewer.