Skip to content

Instantly share code, notes, and snippets.

@rmpel
Created January 18, 2017 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmpel/3c76d5507417d3b01d4f490fb26f3a90 to your computer and use it in GitHub Desktop.
Save rmpel/3c76d5507417d3b01d4f490fb26f3a90 to your computer and use it in GitHub Desktop.
wp-paginate by MaxFoundry version 2.0.0 - input field fix
--- wp-paginate.php 2017-01-18 09:54:43.000000000 +0100
+++ wp-paginate-fixed.php 2017-01-18 10:00:56.000000000 +0100
@@ -537,17 +537,17 @@
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Pagination Label:', 'wp-paginate'); ?></th>
- <td><input name="title" type="text" id="title" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['title'])); ?>"/>
+ <td><input name="title" type="text" id="title" size="40" value="<?php echo esc_attr(stripslashes(htmlspecialchars($this->options['title']))); ?>"/>
<span class="description"><?php _e('The optional text/HTML to display before the list of pages.', 'wp-paginate'); ?></span></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('Previous Page:', 'wp-paginate'); ?></th>
- <td><input name="previouspage" type="text" id="previouspage" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['previouspage'])); ?>"/>
+ <td><input name="previouspage" type="text" id="previouspage" size="40" value="<?php echo esc_attr(stripslashes(htmlspecialchars($this->options['previouspage']))); ?>"/>
<span class="description"><?php _e('The text/HTML to display for the previous page link.', 'wp-paginate'); ?></span></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('Next Page:', 'wp-paginate'); ?></th>
- <td><input name="nextpage" type="text" id="nextpage" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['nextpage'])); ?>"/>
+ <td><input name="nextpage" type="text" id="nextpage" size="40" value="<?php echo esc_attr(stripslashes(htmlspecialchars($this->options['nextpage']))); ?>"/>
<span class="description"><?php _e('The text/HTML to display for the next page link.', 'wp-paginate'); ?></span></td>
</tr>
</table>
@@ -663,12 +663,12 @@
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Before Markup:', 'wp-paginate'); ?></th>
- <td><input name="before" type="text" id="before" size="40" value="<?php echo stripslashes(wp_kses_decode_entities($this->options['before'])); ?>"/>
+ <td><input name="before" type="text" id="before" size="40" value="<?php echo esc_attr(stripslashes(wp_kses_decode_entities($this->options['before']))); ?>"/>
<span class="description"><?php _e('The HTML markup to display before the pagination code.', 'wp-paginate'); ?></span></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('After Markup:', 'wp-paginate'); ?></th>
- <td><input name="after" type="text" id="after" size="40" value="<?php echo stripslashes(wp_kses_decode_entities($this->options['after'])); ?>"/>
+ <td><input name="after" type="text" id="after" size="40" value="<?php echo esc_attr(stripslashes(wp_kses_decode_entities($this->options['after']))); ?>"/>
<span class="description"><?php _e('The HTML markup to display after the pagination code.', 'wp-paginate'); ?></span></td>
</tr>
<tr valign="top">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment