FIX сохранение ссылки в markdown

This commit is contained in:
Krivchikov Dmitry 2015-12-18 14:28:15 +03:00
parent 040ee7fa17
commit d6ef681996
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ class Markdown
static private function replaceUrls($string) static private function replaceUrls($string)
{ {
$pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})([\/\w\?=&#%+,-]|(\.[^\s]))*\/?)'; $pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})([\/\w\?=&#%+,-]|(\.[^\s]))*\/?)';
$rep = '<a href="$0" title="$0" target="_blank">$1</a>'; $rep = '<a href="$0" title="Ссылка откроется в новом окне" target="_blank">$0</a>';
return preg_replace($pr, $rep, $string); return preg_replace($pr, $rep, $string);
} }