From 7fe3ed71f325d19ff509f2f5a005ea7127412104 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 3 Jul 2005 18:14:20 +0000 Subject: [PATCH] * (bug 2683) Really fix apostrophe escaping for toolbox tips --- RELEASE-NOTES | 2 ++ includes/GlobalFunctions.php | 2 +- skins/common/wikibits.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 70b4da309f..427ca7061e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -458,6 +458,8 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. * (bug 2648) Rename namespaces in Afrikaanse * Special:Booksources checks if custom list page exists before using it * (bug 1170) Fixed linktrail for da: and ru: +* (bug 2683) Really fix apostrophe escaping for toolbox tips + === Caveats === diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 1af8091ae4..bc5e2a9277 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -643,7 +643,7 @@ function wfEscapeJsString( $string ) { $pairs = array( "\\" => "\\\\", "\"" => "\\\"", - "\'" => "\\\'", + '\'' => '\\\'', "\n" => "\\n", "\r" => "\\r", diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 74483e4595..8726e646c9 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -306,7 +306,7 @@ function addInfobox(infoText,text_alert) { function escapeQuotes(text) { var re=new RegExp("'","g"); - text=text.replace(re,"\\'"); + text=text.replace(re,"'"); re=new RegExp('"',"g"); text=text.replace(re,'"'); re=new RegExp("\\n","g"); -- 2.20.1