mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Tooltips/Cleanup
* removed double escaped json * fixed itemset tooltips with classes * set cookies to samesite to avoid being rejected by the browser
This commit is contained in:
@@ -226,7 +226,7 @@ class AchievementList extends BaseType
|
||||
break;
|
||||
}
|
||||
|
||||
$criteria .= '<!--cr'.$crt['id'].':'.$crt['type'].':'.$crt['value1'].'-->- '.Util::jsEscape($crtName);
|
||||
$criteria .= '<!--cr'.$crt['id'].':'.$crt['type'].':'.$crt['value1'].'-->- '.$crtName;
|
||||
|
||||
if ($crt['completionFlags'] & ACHIEVEMENT_CRITERIA_FLAG_MONEY_COUNTER)
|
||||
$criteria .= ' <span class="moneygold">'.Lang::nf($crt['value2' ] / 10000).'</span>';
|
||||
@@ -238,13 +238,13 @@ class AchievementList extends BaseType
|
||||
}
|
||||
|
||||
$x = '<table><tr><td><b class="q">';
|
||||
$x .= Util::jsEscape($name);
|
||||
$x .= $name;
|
||||
$x .= '</b></td></tr></table>';
|
||||
if ($description || $criteria)
|
||||
$x .= '<table><tr><td>';
|
||||
|
||||
if ($description)
|
||||
$x .= '<br />'.Util::jsEscape($description).'<br />';
|
||||
$x .= '<br />'.$description.'<br />';
|
||||
|
||||
if ($criteria)
|
||||
{
|
||||
|
||||
@@ -69,11 +69,11 @@ class CurrencyList extends BaseType
|
||||
return array();
|
||||
|
||||
$x = '<table><tr><td>';
|
||||
$x .= '<b>'.Util::jsEscape($this->getField('name', true)).'</b><br>';
|
||||
$x .= '<b>'.$this->getField('name', true).'</b><br>';
|
||||
|
||||
// cata+ (or go fill it by hand)
|
||||
if ($_ = $this->getField('description', true))
|
||||
$x .= '<div style="max-width: 300px" class="q">'.Util::jsEscape($_).'</div>';
|
||||
$x .= '<div style="max-width: 300px" class="q">'.$_.'</div>';
|
||||
|
||||
if ($_ = $this->getField('cap'))
|
||||
$x .= '<br><span class="q">'.Lang::currency('cap').Lang::main('colon').'</span>'.Lang::nf($_).'<br>';
|
||||
|
||||
@@ -98,19 +98,21 @@ class ItemsetList extends BaseType
|
||||
return array();
|
||||
|
||||
$x = '<table><tr><td>';
|
||||
$x .= '<span class="q'.$this->getField('quality').'">'.Util::jsEscape($this->getField('name', true)).'</span><br />';
|
||||
$x .= '<span class="q'.$this->getField('quality').'">'.$this->getField('name', true).'</span><br />';
|
||||
|
||||
$nClasses = 0;
|
||||
$nCl = 0;
|
||||
if ($_ = $this->getField('classMask'))
|
||||
{
|
||||
$cl = Lang::getClassString($_, $__, $nClasses);
|
||||
$x .= Util::ucFirst($nClasses > 1 ? Lang::game('classes') : Lang::game('class')).Lang::main('colon').$cl.'<br />';
|
||||
$jsg = [];
|
||||
$cl = Lang::getClassString($_, $jsg);
|
||||
$nCl = count($jsg);
|
||||
$x .= Util::ucFirst($nCl > 1 ? Lang::game('classes') : Lang::game('class')).Lang::main('colon').$cl.'<br />';
|
||||
}
|
||||
|
||||
if ($_ = $this->getField('contentGroup'))
|
||||
$x .= Util::jsEscape(Lang::itemset('notes', $_)).($this->getField('heroic') ? ' <i class="q2">('.Lang::item('heroic').')</i>' : '').'<br />';
|
||||
$x .= Lang::itemset('notes', $_).($this->getField('heroic') ? ' <i class="q2">('.Lang::item('heroic').')</i>' : '').'<br />';
|
||||
|
||||
if (!$nClasses || !$this->getField('contentGroup'))
|
||||
if (!$nCl || !$this->getField('contentGroup'))
|
||||
$x.= Lang::itemset('types', $this->getField('type')).'<br />';
|
||||
|
||||
if ($bonuses = $this->getBonuses())
|
||||
@@ -118,7 +120,7 @@ class ItemsetList extends BaseType
|
||||
$x .= '<span>';
|
||||
|
||||
foreach ($bonuses as $b)
|
||||
$x .= '<br /><span class=\"q13\">'.$b['bonus'].' '.Lang::itemset('_pieces').Lang::main('colon').'</span>'.Util::jsEscape($b['desc']);
|
||||
$x .= '<br /><span class="q13">'.$b['bonus'].' '.Lang::itemset('_pieces').Lang::main('colon').'</span>'.$b['desc'];
|
||||
|
||||
$x .= '</span>';
|
||||
}
|
||||
|
||||
@@ -54,11 +54,11 @@ class SkillList extends BaseType
|
||||
'category' => $this->curTpl['typeCat'],
|
||||
'categorybak' => $this->curTpl['categoryId'],
|
||||
'id' => $this->id,
|
||||
'name' => Util::jsEscape($this->getField('name', true)),
|
||||
'name' => $this->getField('name', true),
|
||||
'profession' => $this->curTpl['professionMask'],
|
||||
'recipeSubclass' => $this->curTpl['recipeSubClass'],
|
||||
'specializations' => Util::toJSON($this->curTpl['specializations'], JSON_NUMERIC_CHECK),
|
||||
'icon' => Util::jsEscape($this->curTpl['iconString'])
|
||||
'icon' => $this->curTpl['iconString']
|
||||
);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class SkillList extends BaseType
|
||||
$data = [];
|
||||
|
||||
foreach ($this->iterate() as $__)
|
||||
$data[self::$type][$this->id] = ['name' => Util::jsEscape($this->getField('name', true)), 'icon' => Util::jsEscape($this->curTpl['iconString'])];
|
||||
$data[self::$type][$this->id] = ['name' => $this->getField('name', true), 'icon' => $this->curTpl['iconString']];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class SoundList extends BaseType
|
||||
|
||||
foreach ($this->iterate() as $__)
|
||||
$data[self::$type][$this->id] = array(
|
||||
'name' => Util::jsEscape($this->getField('name', true)),
|
||||
'name' => $this->getField('name', true),
|
||||
'type' => $this->getField('cat'),
|
||||
'files' => array_values(array_filter($this->getField('files')))
|
||||
);
|
||||
|
||||
@@ -175,7 +175,7 @@ class WorldEventList extends BaseType
|
||||
$x = '<table><tr><td>';
|
||||
|
||||
// head v that extra % is nesecary because we are using sprintf later on
|
||||
$x .= '<table width="100%%"><tr><td><b>'.Util::jsEscape($this->getField('name', true)).'</b></td><th><b class="q0">'.Lang::event('category', $this->getField('category')).'</b></th></tr></table>';
|
||||
$x .= '<table width="100%%"><tr><td><b>'.$this->getField('name', true).'</b></td><th><b class="q0">'.Lang::event('category', $this->getField('category')).'</b></th></tr></table>';
|
||||
|
||||
// use string-placeholder for dates
|
||||
// start
|
||||
@@ -188,7 +188,7 @@ class WorldEventList extends BaseType
|
||||
// desc
|
||||
if ($this->getField('holidayId'))
|
||||
if ($_ = $this->getField('description', true))
|
||||
$x .= '<table><tr><td><span class="q">'.Util::jsEscape($_).'</span></td></tr></table>';
|
||||
$x .= '<table><tr><td><span class="q">'.$_.'</span></td></tr></table>';
|
||||
|
||||
return $x;
|
||||
}
|
||||
|
||||
@@ -507,6 +507,8 @@ $WH.sc = function(z, y, x, w, v) {
|
||||
a.setDate(a.getDate() + y);
|
||||
b += "expires=" + a.toUTCString() + "; ";
|
||||
|
||||
b += "SameSite=strict;";
|
||||
|
||||
if (w) {
|
||||
b += "path=" + w + "; ";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user