1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## trac 4804.dpatch by <andrea.de.iacovo@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix for trac #4804
@DPATCH@
--- wordpress-etch/wp-includes/functions-formatting.php 2007-03-24 00:33:19.000000000 +0100
+++ wordpress-etch/wp-includes/functions-formatting.php 2008-04-22 11:42:10.000000000 +0200
@@ -20,7 +20,7 @@
// if a plugin has provided an autocorrect array, use it
if ( isset($wp_cockneyreplace) ) {
$cockney = array_keys($wp_cockneyreplace);
- $cockney_replace = array_values($wp_cockneyreplace);
+ $cockneyreplace = array_values($wp_cockneyreplace);
} else {
$cockney = array("'tain't","'twere","'twas","'tis","'twill","'til","'bout","'nuff","'round","'cause");
$cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round","’cause");
@@ -1067,7 +1067,7 @@
// Escape single quotes, specialchar double quotes, and fix line endings.
function js_escape($text) {
$safe_text = wp_specialchars($text, 'double');
- $safe_text = str_replace(''', "'", $safe_text);
+ $safe_text = preg_replace('/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes($safe_text));
$safe_text = preg_replace("/\r?\n/", "\\n", addslashes($safe_text));
return apply_filters('js_escape', $safe_text, $text);
}
|