Correctly escape URLs.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 10 Feb 2009 00:17:00 +0000 (17:17 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 10 Feb 2009 02:07:31 +0000 (19:07 -0700)
imp/fetchmailprefs.php

index f3535f5..ba2d268 100644 (file)
@@ -187,9 +187,11 @@ if (empty($actionID)) {
 Prefs_UI::generateHeader(null, $chunk);
 Horde::addScriptFile('prototype.js', 'horde', true);
 Horde::addScriptFile('fetchmailprefs.js', 'imp', true);
+
+$charset = NLS::getCharset();
 IMP::addInlineScript(array(
-    'ImpFetchmailprefs.fetchurl = \'' . $fetch_url . '\'',
-    'ImpFetchmailprefs.prefsurl = \'' . $prefs_url . '\''
+    'ImpFetchmailprefs.fetchurl = ' . Horde_Serialize($fetch_url, SERIALIZE_JSON, $charset),
+    'ImpFetchmailprefs.prefsurl = ' . Horde_Serialize($prefs_url, SERIALIZE_JSON, $charset)
 ));
 
 echo $t->fetch(IMP_TEMPLATES . '/fetchmail/fetchmailprefs.html');