From 7ed72077f83a9ecb54f92e92afb2aff87b40a414 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 5 Feb 2009 14:10:48 -0700 Subject: [PATCH] Bug #7926: Make sure we decode before re-encoding. --- imp/pgp.php | 4 ++-- imp/smime.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/imp/pgp.php b/imp/pgp.php index a65ec9a4f..ce20f9e7c 100644 --- a/imp/pgp.php +++ b/imp/pgp.php @@ -116,7 +116,7 @@ case 'process_import_public_key': foreach ($key_info['signature'] as $sig) { $notification->push(sprintf(_("PGP Public Key for \"%s (%s)\" was successfully added."), $sig['name'], $sig['email']), 'horde.success'); } - Util::closeWindowJS('opener.focus();opener.location.href="' . htmlspecialchars(Util::getFormData('reload')) . '";'); + Util::closeWindowJS('opener.focus();opener.location.href="' . htmlspecialchars(html_entity_decode(Util::getFormData('reload'))) . '";'); } } exit; @@ -166,7 +166,7 @@ case 'process_import_personal_private_key': * successfully - close the import popup window. */ $imp_pgp->addPersonalPrivateKey($privateKey); $notification->push(_("PGP private key successfully added."), 'horde.success'); - Util::closeWindowJS('opener.focus();opener.location.href="' . htmlspecialchars(Util::getFormData('reload')) . '";'); + Util::closeWindowJS('opener.focus();opener.location.href="' . htmlspecialchars(html_entity_decode(Util::getFormData('reload'))) . '";'); } else { /* Invalid private key imported - Redo private key import * screen. */ diff --git a/imp/smime.php b/imp/smime.php index 73e057a53..26f1ec2a0 100644 --- a/imp/smime.php +++ b/imp/smime.php @@ -20,7 +20,7 @@ function _importKeyDialog($target) $t->setOption('gettext', true); $t->set('selfurl', Horde::applicationUrl('smime.php')); $t->set('broken_mp_form', $GLOBALS['browser']->hasQuirk('broken_multipart_form')); - $t->set('reload', htmlspecialchars(Util::getFormData('reload'))); + $t->set('reload', htmlspecialchars(html_entity_decode(Util::getFormData('reload')))); $t->set('target', $target); $t->set('forminput', Util::formInput()); $t->set('import_public_key', $target == 'process_import_public_key'); @@ -54,7 +54,7 @@ function _actionWindow() function _reloadWindow() { - Util::closeWindowJS('opener.focus();opener.location.href="' . htmlspecialchars(Util::getFormData('reload')) . '";'); + Util::closeWindowJS('opener.focus();opener.location.href="' . htmlspecialchars(html_entity_decode(Util::getFormData('reload'))) . '";'); } function _textWindowOutput($filename, $msg, $html = false) -- 2.11.0