Skip to content
Permalink
Browse files

When adding absolute resources leave alone URLs that already have a s…

…cheme.
  • Loading branch information
bramley authored and suelaP committed Feb 18, 2020
1 parent 622d9a2 commit 078bf3487cbbad0de7e32b48ab996be6416d9b37
Showing with 3 additions and 3 deletions.
  1. +3 −3 public_html/lists/admin/inc/maillib.php
@@ -145,9 +145,9 @@ function addAbsoluteResources($text, $url)
for ($i = 0; $i < count($foundtags[0]); ++$i) {
$match = $foundtags[2][$i];
$tagmatch = $foundtags[1][$i];
// print "$match<br/>";
if (preg_match('#^(http|javascript|https|ftp|mailto):#i', $match)) {
// scheme exists, leave it alone

if (preg_match('#^[a-z][a-z0-9.-]*:#i', $match)) {
// begins with a scheme, leave it alone
} elseif (preg_match("#\[.*\]#U", $match)) {
// placeholders used, leave alone as well
} elseif (substr($match, 0, 2) == '//') {

0 comments on commit 078bf34

Please sign in to comment.
You can’t perform that action at this time.