Skip to content

Commit

Permalink
FIX Do not escape valid HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 16, 2024
1 parent 41bf02c commit 5b09d61
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Extensions/GroupSubsites.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5b09d61

Please sign in to comment.