diff --git a/src/deref.php b/src/deref.php index d2d7f58..ec316a6 100644 --- a/src/deref.php +++ b/src/deref.php @@ -53,6 +53,7 @@ $sepPos = strpos($url, '?'); if($sepPos !== false) { $targetURL = substr($url, $sepPos+1); + $targetURL = str_replace('%23','#',$targetURL); $tpl->assign('pref_exturl_warning', $bm_prefs['exturl_warning']); if($bm_prefs['exturl_warning']=='no') { $tpl->assign('url', HTMLFormat($targetURL)); diff --git a/src/serverlib/htmlemailformatter.class.php b/src/serverlib/htmlemailformatter.class.php index 82846a6..d1bfe20 100644 --- a/src/serverlib/htmlemailformatter.class.php +++ b/src/serverlib/htmlemailformatter.class.php @@ -142,7 +142,7 @@ if(class_exists('DOMDocument')) if($lcName == 'href' && preg_match('~^(http|https|ftp)://~i', $val)) { - $val = ($this->replyMode ? '' : 'deref.php?') . $val; + $val = ($this->replyMode ? '' : 'deref.php?') . str_replace('#','%23',$val); $allow = true; } else if($lcName == 'href' && preg_match('~^mailto:~i', $val))