My case is different, because I am not using “title” nor “slug” (which are escaped by default), but a default text field and an own page model for displaying the “title”
public function title(): Kirby\Content\Field
{
// content file
// Headline: Hirn & Heinrich - der Wissenspodcast des Deutschen Zentrums für Neurodegenerative Erkrankungen e.V. (DZNE)
// KO! Hirn & Heinrich …
return $this->headline()->excerpt(50)->or('Hilfsangebot');
// OK! Hirn & Heinrich …
// return $this->headline()->or('Hilfsangebot');
}
So the output of $this->headline() is not escaped until adding →escape(). OK!
But when create an excerpt, the output is unexpectedly escaped.
As far i can see, its the method, that transform the content
mmh, what do you think? Is that a bug because it’s inconsistent?
$this->headline() unescaped output is expected: OK!
$this->headline()->excerpt(50) unescaped output is expected: KO! output is escaped
Should be (if escaped output is wanted):
$this->headline()->escape() escaped output is expected: OK!
$this->headline()->excerpt(50)→escape() escaped output is expected: Not implemented