Commit cc1c1c68 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

changed str_shorten to replace over escaped & to &

parent 5a960662
......@@ -2020,8 +2020,10 @@ function str_shorten($str, $maxlen=100, $truncate=false, $newlines=true) {
if (strlen($str) > $maxlen) {
$str = substr($str, 0, floor($maxlen / 2) - 1) . '...' . substr($str, -(floor($maxlen / 2) - 2));
}
return nl2br(hsc($str));
$str = nl2br(hsc($str));
// this should be ok, because the string gets checked before going into the database
$str = str_replace('&', '&', $str);
return $str;
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment