Skip to content
Snippets Groups Projects
Commit e2152132 authored by Denis Walker's avatar Denis Walker
Browse files

Woken up a bit and implemented the ndash fix in a way that actually works.

parent 1554456c
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ function decode_entities($text, $quote_style = ENT_COMPAT) {
$trans_tbl = array_flip($trans_tbl);
$text = strtr($text, $trans_tbl);
}
if ($text="–") $text = "-";
$text = preg_replace('–', '-', $text);
$text = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $text);
$text = preg_replace('~&#([0-9]+);~e', 'chr("\\1")', $text);
return $text;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment