From 2af45127b80f255b17bedf59d6f612237e81c40f Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Fri, 11 Sep 2015 15:06:22 +0300 Subject: [PATCH] =?UTF-8?q?FIX=20=D0=BF=D0=BE=D0=B4=D0=B3=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=D0=BA=D0=B0=20=D1=87=D0=B8=D1=81=D1=82=D0=BE=D0=B9?= =?UTF-8?q?=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D1=82=D0=B0=20-=20=D0=B7=D0=B0=D0=B1=D1=8B=D0=BB=20?= =?UTF-8?q?=D1=83=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20=D1=81=D1=81=D1=8B=D0=BB?= =?UTF-8?q?=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/classes/Markdown.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ground/classes/Markdown.php b/ground/classes/Markdown.php index 2a6798e..767ef9a 100644 --- a/ground/classes/Markdown.php +++ b/ground/classes/Markdown.php @@ -115,16 +115,16 @@ class Markdown // \n & \r $string = str_replace(array("\n","\r",' -- '), array(' ', ' ',' – '), $string); + // URL + $pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})[\/\w\?=&#%+\.,-]*\/?)'; + $rep = ''; + $string = preg_replace($pr, $rep, $string); + // multi-space $pr = '(\s{2,})'; $rep = ' '; $string = preg_replace($pr, $rep, $string); - // URL - $pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})[\/\w\?=&#%+\.,-]*\/?)'; - $rep = '$1'; - $string = preg_replace($pr, $rep, $string); - return trim($string); }