Permalink
Browse files

BUGFIX: Don't break CMS tree if HTML gets into MenuTitle

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77826 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 475e077 commit acf9e01f61b1c16d1cc97dc5260f279d0da89e08 @sminnee sminnee committed with chillu May 26, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 core/model/SiteTree.php
View
@@ -1780,7 +1780,8 @@ function TreeTitle() {
$tag = '';
}
- return ($tag) ? "<$tag>" . $this->MenuTitle . "</" . strtok($tag,' ') . ">" : $this->MenuTitle;
+ $text = Convert::raw2xml(str_replace(array("\n","\r"),"",$this->MenuTitle));
+ return ($tag) ? "<$tag>" . $text . "</" . strtok($tag,' ') . ">" : $text;
}
/**
@@ -1948,4 +1949,4 @@ function getParentType() {
}
-?>
+?>

0 comments on commit acf9e01

Please sign in to comment.