Ticket #914: search-slashes.diff
| File search-slashes.diff, 2.2 KB (added by nbachiyski, 7 years ago) |
|---|
-
wp-includes/classes.php
334 334 335 335 // If a search pattern is specified, load the posts that match 336 336 if (!empty($q['s'])) { 337 $q['s'] = addslashes_gpc($q['s']);338 337 $search = ' AND ('; 339 338 $q['s'] = preg_replace('/, +/', ' ', $q['s']); 340 339 $q['s'] = str_replace(',', ' ', $q['s']); … … 1268 1267 $wp_rewrite = new WP_Rewrite(); 1269 1268 } 1270 1269 1271 ?> 1272 No newline at end of file 1270 ?> -
wp-content/themes/default/searchform.php
1 1 <form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>"> 2 <div><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />2 <div><input type="text" value="<?php echo stripslashes($s); ?>" name="s" id="s" /> 3 3 <input type="submit" id="searchsubmit" value="Search" /> 4 4 </div> 5 </form> 6 No newline at end of file 5 </form> -
wp-content/themes/default/sidebar.php
29 29 30 30 <?php /* If this is a monthly archive */ } elseif (is_search()) { ?> 31 31 <p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives 32 for <strong>'<?php echo wp_specialchars( $s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>32 for <strong>'<?php echo wp_specialchars(stripslashes($s)); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> 33 33 34 34 <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> 35 35 <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
