1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Fix issue with multi-byte string compatibility

This commit is contained in:
netniV 2020-05-04 19:03:53 +00:00
parent cd6912dfb3
commit 680287bb78

View File

@ -553,7 +553,7 @@ class Parsedown
}
$text = trim($text, ' ');
$link = strtolower(str_replace(' ','-',$text));
$link = preg_replace('/[^\p{L}\p{N}\p{M}-]+/u', '', mb_strtolower(mb_ereg_replace(' ','-',$text)));
$attr = array();
if (!empty($link)) {
$attr = array(