WP-Paginate - Version 1.2.2

Version Description

  • Fixed a XSS vulnerability reported by Andreas Schobel (@aschobel)
Download this release

Release Info

Developer emartin24
Plugin Icon 128x128 WP-Paginate
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.2.1 to 1.2.2

Files changed (2) hide show
  1. readme.txt +4 -1
  2. wp-paginate.php +6 -6
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.ericmmartin.com/donate/
4
  Tags: paginate, pagination, navigation, page, wp-paginate, comments, rtl, seo, usability
5
  Requires at least: 2.2.0 (2.7.0 for comments pagination)
6
  Tested up to: 3.0.1
7
- Stable tag: 1.2.1
8
 
9
  WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
10
 
@@ -109,6 +109,9 @@ This allows you to use the `.wp-paginate-comments` styles, already in `wp-pagina
109
 
110
  == Changelog ==
111
 
 
 
 
112
  = 1.2.1 =
113
  * Added is_rtl function check to prevent errors with older version of WordPress
114
 
4
  Tags: paginate, pagination, navigation, page, wp-paginate, comments, rtl, seo, usability
5
  Requires at least: 2.2.0 (2.7.0 for comments pagination)
6
  Tested up to: 3.0.1
7
+ Stable tag: 1.2.2
8
 
9
  WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
10
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.2.2 =
113
+ * Fixed a XSS vulnerability reported by Andreas Schobel (@aschobel)
114
+
115
  = 1.2.1 =
116
  * Added is_rtl function check to prevent errors with older version of WordPress
117
 
wp-paginate.php CHANGED
@@ -4,9 +4,9 @@ Plugin Name: WP-Paginate
4
  Plugin URI: http://www.ericmmartin.com/projects/wp-paginate/
5
  Description: A simple and flexible pagination plugin for WordPress posts and comments.
6
  Author: Eric Martin
7
- Version: 1.2.1
8
  Author URI: http://www.ericmmartin.com
9
- Revision: $Id: wp-paginate.php 295407 2010-09-30 21:59:37Z emartin24 $
10
  */
11
 
12
  /* Copyright 2010 Eric Martin (eric@ericmmartin.com)
@@ -43,7 +43,7 @@ if (!class_exists('WPPaginate')) {
43
  /**
44
  * @var string The plugin version
45
  */
46
- var $version = '1.2.1';
47
 
48
  /**
49
  * @var string The options string name for this plugin
@@ -126,10 +126,10 @@ if (!class_exists('WPPaginate')) {
126
  }
127
 
128
  $prevlink = ($this->type === 'posts')
129
- ? get_pagenum_link($page - 1)
130
  : get_comments_pagenum_link($page - 1);
131
  $nextlink = ($this->type === 'posts')
132
- ? get_pagenum_link($page + 1)
133
  : get_comments_pagenum_link($page + 1);
134
 
135
  $output = stripslashes($before);
@@ -193,7 +193,7 @@ if (!class_exists('WPPaginate')) {
193
  function paginate_loop($start, $max, $page = 0) {
194
  $output = "";
195
  for ($i = $start; $i <= $max; $i++) {
196
- $p = ($this->type === 'posts') ? get_pagenum_link($i) : get_comments_pagenum_link($i);
197
  $output .= ($page == intval($i))
198
  ? "<li><span class='page current'>$i</span></li>"
199
  : "<li><a href='$p' title='$i' class='page'>$i</a></li>";
4
  Plugin URI: http://www.ericmmartin.com/projects/wp-paginate/
5
  Description: A simple and flexible pagination plugin for WordPress posts and comments.
6
  Author: Eric Martin
7
+ Version: 1.2.2
8
  Author URI: http://www.ericmmartin.com
9
+ Revision: $Id: wp-paginate.php 315138 2010-11-24 04:55:42Z emartin24 $
10
  */
11
 
12
  /* Copyright 2010 Eric Martin (eric@ericmmartin.com)
43
  /**
44
  * @var string The plugin version
45
  */
46
+ var $version = '1.2.2';
47
 
48
  /**
49
  * @var string The options string name for this plugin
126
  }
127
 
128
  $prevlink = ($this->type === 'posts')
129
+ ? esc_url(get_pagenum_link($page - 1))
130
  : get_comments_pagenum_link($page - 1);
131
  $nextlink = ($this->type === 'posts')
132
+ ? esc_url(get_pagenum_link($page + 1))
133
  : get_comments_pagenum_link($page + 1);
134
 
135
  $output = stripslashes($before);
193
  function paginate_loop($start, $max, $page = 0) {
194
  $output = "";
195
  for ($i = $start; $i <= $max; $i++) {
196
+ $p = ($this->type === 'posts') ? esc_url(get_pagenum_link($i)) : get_comments_pagenum_link($i);
197
  $output .= ($page == intval($i))
198
  ? "<li><span class='page current'>$i</span></li>"
199
  : "<li><a href='$p' title='$i' class='page'>$i</a></li>";