FIX сохранение ссылки в markdown
This commit is contained in:
parent
040ee7fa17
commit
d6ef681996
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue