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, ' '); $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(); $attr = array();
if (!empty($link)) { if (!empty($link)) {
$attr = array( $attr = array(