|
@@ -116,7 +116,9 @@ |
|
|
block discarded – undo |
|
116
|
116
|
: '~(?:(https?)://([^\s<>]+)|(?<!\w@)\b([^\s<>@]+?\.[^\s<>]+)(?<![\.,:]))~i'; |
|
117
|
117
|
|
|
118
|
118
|
return preg_replace_callback($regexp, function ($match) use ($protocol, &$links, $attr) { |
|
119
|
|
- if ($match[1]) $protocol = $match[1]; |
|
|
119
|
+ if ($match[1]) { |
|
|
120
|
+ $protocol = $match[1]; |
|
|
121
|
+ } |
|
120
|
122
|
$link = $match[2] ?: $match[3]; |
|
121
|
123
|
|
|
122
|
124
|
return '<' . array_push($links, '<a' . $attr . ' href="' . $protocol . '://' . $link . '">' |
Please login to merge, or discard this patch.