Pages/Quest

* escape placeholder tags in quest name for display
This commit is contained in:
Sarjuuk
2018-08-26 16:49:29 +02:00
parent 6f578b31e0
commit 31ec17d279
2 changed files with 5 additions and 3 deletions

View File

@@ -313,7 +313,7 @@ class QuestList extends BaseType
if (!$this->curTpl)
return null;
$title = Util::jsEscape($this->getField('name', true));
$title = Util::jsEscape(htmlentities($this->getField('name', true)));
$level = $this->curTpl['level'];
if ($level < 0)
$level = 0;

View File

@@ -33,7 +33,8 @@ class QuestPage extends GenericPage
if ($this->subject->error)
$this->notFound();
$this->name = $this->subject->getField('name', true);
// may contain htmlesque tags
$this->name = htmlentities($this->subject->getField('name', true));
}
protected function generatePath()
@@ -46,7 +47,8 @@ class QuestPage extends GenericPage
protected function generateTitle()
{
array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('quest')));
// page title already escaped
array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::game('quest')));
}
protected function generateContent()