summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-02-28 17:33:26 +0000
committeralecpl <alec@alec.pl>2011-02-28 17:33:26 +0000
commit29c54229cfbc104930e7743cecc212f53aed8a15 (patch)
tree46454dce5a10a1efaa213772553b16bca074f197 /program/steps
parentd7167e9eeb372127a857fbd87117dd52758f8597 (diff)
- Fix parsing links with non-printable characters inside (#1487805)
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 9fa1e01fc..090317691 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1200,6 +1200,9 @@ function rcmail_alter_html_link($matches)
$attrib = parse_attrib_string($matches[2]);
$end = '>';
+ // Remove non-printable characters in URL (#1487805)
+ $attrib['href'] = preg_replace('/[\x00-\x1F]/', '', $attrib['href']);
+
if ($tag == 'link' && preg_match('/^https?:\/\//i', $attrib['href'])) {
$tempurl = 'tmp-' . md5($attrib['href']) . '.css';
$_SESSION['modcssurls'][$tempurl] = $attrib['href'];