diff --git a/classes/Helper.php b/classes/Helper.php index 36ca757..121b8c1 100644 --- a/classes/Helper.php +++ b/classes/Helper.php @@ -96,6 +96,13 @@ class Helper return $string; } + static function replaceUrls($string) + { + $pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})([\/\w\?=&#%+,-]|(\.[^\s]))*\/?)'; + $rep = '$0'; + return preg_replace($pr, $rep, $string); + } + public static function getFirstImg($string) { preg_match_all("(\[img[\|]#(\d+)\])", $string, $images); diff --git a/views/point.php b/views/point.php index 944067a..5dac4fd 100644 --- a/views/point.php +++ b/views/point.php @@ -84,7 +84,7 @@ $index = 0; '; print ''.$extraParam->name.''; - print ''.$extraParam->value.''; + print ''. Helper::replaceUrls($extraParam->value).''; print ''; } ?>