mirror of
https://github.com/getgrav/grav.git
synced 2026-07-19 23:21:01 +02:00
Handle special case of <? tags in the Truncator, fixes https://github.com/getgrav/grav-plugin-admin/issues/204
This commit is contained in:
@@ -170,6 +170,7 @@ class Truncator {
|
||||
return array(implode('', array_slice($words, 0, $length)), $count, $opts);
|
||||
}
|
||||
}
|
||||
|
||||
protected static function ellipsable($node)
|
||||
{
|
||||
return ($node instanceof DOMDocument)
|
||||
@@ -179,11 +180,15 @@ class Truncator {
|
||||
|
||||
protected static function xmlEscape($string)
|
||||
{
|
||||
return str_replace('&', '&', $string);
|
||||
$string = str_replace('&', '&', $string);
|
||||
$string = str_replace('<?', '<?', $string);
|
||||
return $string;
|
||||
}
|
||||
|
||||
protected static function xmlUnescape($string)
|
||||
{
|
||||
return str_replace('&', '&', $string);
|
||||
$string = str_replace('&', '&', $string);
|
||||
$string = str_replace('<?', '<?', $string);
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user