Changeset 10856
- Timestamp:
- 04/01/2009 05:45:28 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/press-this.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/press-this.php
r10855 r10856 12 12 13 13 if ( ! current_user_can('edit_posts') ) wp_die( __( 'Cheatin’ uh?' ) ); 14 15 /**16 * Replace forward slash with backslash and slash.17 *18 * @package WordPress19 * @subpackage Press_This20 * @since 2.6.021 *22 * @param string $string23 * @return string24 */25 function preg_quote2($string) {26 return str_replace('/', '\/', preg_quote($string));27 }28 14 29 15 /** … … 72 58 73 59 // Replace the POSTED content <img> with correct uploaded ones. Regex contains fix for Magic Quotes 74 if( !is_wp_error($upload) ) $content = preg_replace('/<img ([^>]*)src=\\\?(\"|\')'.preg_quote 2($image).'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content);60 if( !is_wp_error($upload) ) $content = preg_replace('/<img ([^>]*)src=\\\?(\"|\')'.preg_quote($image, '/').'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content); 75 61 } 76 62
Note: See TracChangeset
for help on using the changeset viewer.