From 5b09d61939defa8ed3bec1e16c931cc5add23c4d Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 17 Dec 2024 11:27:49 +1300 Subject: [PATCH] FIX Do not escape valid HTML --- src/Extensions/GroupSubsites.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Extensions/GroupSubsites.php b/src/Extensions/GroupSubsites.php index 7e6d2707..9e90115a 100644 --- a/src/Extensions/GroupSubsites.php +++ b/src/Extensions/GroupSubsites.php @@ -126,6 +126,17 @@ protected function updateCMSFields(FieldList $fields) } } + public function getTreeTitle(): string + { + // Overrides Hierachy::getTreeTitle() to change where Convert::raw2xml() is called + // so that the html added updateTreeTitle() is not escaped. + $owner = $this->getOwner(); + $title = $owner->MenuTitle ?: $owner->Title; + $title = Convert::raw2xml($title); + $owner->extend('updateTreeTitle', $title); + return $title; + } + /** * If this group belongs to a subsite, append the subsites title to the group title to make it easy to * distinguish in the tree-view of the security admin interface.