From 4dc4dc14ba6230777e58a9dbb7a4146ac75730d7 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Fri, 11 Oct 2013 16:00:32 +0000
Subject: [PATCH] Don't make <a> tag content clickable

---
 include/class.format.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.format.php b/include/class.format.php
index 251b1b1f9..5be966780 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -241,7 +241,7 @@ class Format {
 
         $token = $ost->getLinkToken();
         //Not perfect but it works - please help improve it.
-        $text=preg_replace_callback('/(?<!")(((f|ht){1}tp(s?):\/\/)[-a-zA-Z0-9@:%_\+.~#?&;\/\/=]+)/',
+        $text=preg_replace_callback('/(?<!"|>)(((f|ht)tp(s?):\/\/)[-a-zA-Z0-9@:%_\+.~#?&;\/\/=]+)/',
                 create_function('$matches', # nolint
                     sprintf('return "<a href=\"l.php?url=".urlencode($matches[1])."&auth=%s\" target=\"_blank\">".$matches[1]."</a>";', # nolint
                         $token)),
-- 
GitLab