Upstream filp/whoops state of the touched files before 4a1b06f129
This commit is contained in:
1 parent
1e51c75014
commit
24517bcbde
2 files changed
+1
-42
No files matched your search
@@ -80,9 +80,6 @@ class TemplateHelper
|
||||
* Escapes a string for output in an HTML document, but preserves
|
||||
* URIs within it, and converts them to clickable anchor elements.
|
||||
*
|
||||
* Only http and https URIs are linkified; other schemes are left as
|
||||
* plain escaped text so that a link cannot execute script when clicked.
|
||||
*
|
||||
* @param string $raw
|
||||
* @return string
|
||||
*/
|
||||
@@ -90,7 +87,7 @@ class TemplateHelper
|
||||
{
|
||||
$escaped = $this->escape($raw);
|
||||
return preg_replace(
|
||||
"@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@i",
|
||||
"@([A-z]+?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@",
|
||||
"<a href=\"$1\" target=\"_blank\" rel=\"noreferrer noopener\">$1</a>",
|
||||
$escaped
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user