Changeset 590779
- Timestamp:
- 08/27/2012 06:23:37 AM (14 years ago)
- Location:
- wp-recentcomments/trunk
- Files:
-
- 4 edited
-
CHANGELOG.txt (modified) (1 diff)
-
README.txt (modified) (2 diffs)
-
core.php (modified) (4 diffs)
-
wp-recentcomments.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-recentcomments/trunk/CHANGELOG.txt
r588696 r590779 1 1 VERSION DATE TYPE CHANGES 2 2.2.3 2012/08/27 FIX Fixed comments when reviewer name contain '\' character. 2 3 2.2.2 2012/08/22 MODIFY Edit JavaScript with JSHint rules. 3 4 MODIFY Add notice when submit successfully. -
wp-recentcomments/trunk/README.txt
r588696 r590779 5 5 Requires at least: 2.5 6 6 Tested up to: 3.4.1 7 Stable tag: 2.2. 27 Stable tag: 2.2.3 8 8 9 9 Display recent comments in your blog sidebar. … … 100 100 101 101 VERSION DATE TYPE CHANGES 102 2.2.3 2012/08/27 FIX Fixed comments when reviewer name contain '\' character. 102 103 2.2.2 2012/08/22 MODIFY Edit JavaScript with JSHint rules. 103 104 MODIFY Add notice when submit successfully. -
wp-recentcomments/trunk/core.php
r544370 r590779 157 157 // Formatting title. 158 158 $postTitle = rc_format_title(get_the_title($comment->comment_post_ID)); 159 160 // Formatting reviewer name. 161 $reviewerName = rc_format_reviewer_name($comment->comment_author); 159 162 160 163 // Formatting content. … … 199 202 $json .= '"timestamp":"' . $timestamp . '",'; 200 203 $json .= '"postUrl":"' . get_permalink($comment->comment_post_ID) . '",'; 201 $json .= '"reviewerName":"' . $ comment->comment_author. '",';204 $json .= '"reviewerName":"' . $reviewerName . '",'; 202 205 $json .= '"reviewerUrl":"' . get_comment_author_url() . '",'; 203 206 $json .= '"id":"' . $comment->comment_ID . '",'; … … 233 236 function rc_format_title($title) { 234 237 // Encode " and '. 235 return preg_replace(array('/\<(.+?)\>/', '/\"/', "/\'/"), array('', '\"', "\'"), $title); 238 return preg_replace(array('/\<(.+?)\>/', '/\\\/', '/\"/', "/\'/"), array('', '\\\\\\', '\"', "\'"), $title); 239 } 240 241 /** 242 * Retrieve formatted reviewer name. 243 */ 244 function rc_format_reviewer_name($content) { 245 246 // Encode \, " and '. 247 return preg_replace(array('/\\\/', '/\"/', "/\'/"), array('\\\\\\', '\"', "\'"), $content); 236 248 } 237 249 … … 246 258 } 247 259 248 // Encode " and '.249 return preg_replace(array('/\ "/', "/\'/"), array('\"', "\'"), $content);260 // Encode \, " and '. 261 return preg_replace(array('/\\\/', '/\"/', "/\'/"), array('\\\\\\', '\"', "\'"), $content); 250 262 } 251 263 -
wp-recentcomments/trunk/wp-recentcomments.php
r590768 r590779 4 4 Plugin URI: http://www.neoease.com/plugins/ 5 5 Description: Show the recent comments in your WordPress sidebar. 6 Version: 2.2. 26 Version: 2.2.3 7 7 Author: mg12 8 8 Author URI: http://www.neoease.com/ … … 482 482 function load_static() { 483 483 $options = get_option('wp_recentcomments_options'); 484 $plugins_version = '2.2. 2';484 $plugins_version = '2.2.3'; 485 485 $plugins_url = plugins_url('wp-recentcomments'); 486 486 $plugins_css_url = $plugins_url . '/css';
Note: See TracChangeset
for help on using the changeset viewer.