From 29c54229cfbc104930e7743cecc212f53aed8a15 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Mon, 28 Feb 2011 12:33:26 -0500 Subject: [PATCH] - Fix parsing links with non-printable characters inside (#1487805) --- program/steps/mail/func.inc | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 9fa1e01..0903176 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1200,6 +1200,9 @@ $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']; -- Gitblit v1.9.1