mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Template/Escaped Strings
* escape creature subnames in DetailPage * escape creature names & subnames in Tooltips * js escape inherited filter froms
This commit is contained in:
@@ -81,10 +81,10 @@ class CreatureList extends BaseType
|
|||||||
$row3[] = '('.$_.')';
|
$row3[] = '('.$_.')';
|
||||||
|
|
||||||
$x = '<table>';
|
$x = '<table>';
|
||||||
$x .= '<tr><td><b class="q">'.$this->getField('name', true).'</b></td></tr>';
|
$x .= '<tr><td><b class="q">'.Util::htmlEscape($this->getField('name', true)).'</b></td></tr>';
|
||||||
|
|
||||||
if ($sn = $this->getField('subname', true))
|
if ($sn = $this->getField('subname', true))
|
||||||
$x .= '<tr><td>'.$sn.'</td></tr>';
|
$x .= '<tr><td>'.Util::htmlEscape($sn).'</td></tr>';
|
||||||
|
|
||||||
$x .= '<tr><td>'.implode(' ', $row3).'</td></tr>';
|
$x .= '<tr><td>'.implode(' ', $row3).'</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class NpcPage extends GenericPage
|
|||||||
$this->notFound(Lang::game('npc'), Lang::npc('notFound'));
|
$this->notFound(Lang::game('npc'), Lang::npc('notFound'));
|
||||||
|
|
||||||
$this->name = Util::htmlEscape($this->subject->getField('name', true));
|
$this->name = Util::htmlEscape($this->subject->getField('name', true));
|
||||||
$this->subname = $this->subject->getField('subname', true);
|
$this->subname = Util::htmlEscape($this->subject->getField('subname', true));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function generatePath()
|
protected function generatePath()
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ if (!empty($this->pageTemplate)):
|
|||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (!empty($fi)):
|
if (!empty($fi)):
|
||||||
echo " Menu.modifyUrl(Menu.findItem(mn_database, [".$fi['menuItem']."]), { filter: '+=".$fi['query']."' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [".$fi['menuItem']."])) });\n";
|
echo " Menu.modifyUrl(Menu.findItem(mn_database, [".$fi['menuItem']."]), { filter: '+=".Util::jsEscape($fi['query'])."' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [".$fi['menuItem']."])) });\n";
|
||||||
// $(document).ready(function(){ Menu.modifyUrl(Menu.findItem(mn_path, [1,5]), { filter: 'na=Malgayne'}, { onAppendCollision: fi_mergeFilterParams }) });
|
// $(document).ready(function(){ Menu.modifyUrl(Menu.findItem(mn_path, [1,5]), { filter: 'na=Malgayne'}, { onAppendCollision: fi_mergeFilterParams }) });
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user