Fixed Unescaped phrase in \XF\Template\Templater::getDataRowCell()

Kirby

Well-known member
Affected version
2.1.0 Beta 2
Phrase delete is not escaped when used in \XF\Template\Templater::getDataRowCell() for a title attribute.

PHP:
if (!$tooltip)
{
    $tooltip = \XF::phrase('delete');
}
$html = "<a href=\"{$href}\" class=\"iconic iconic--delete dataList-delete\" data-xf-init=\"tooltip\" title=\"{$tooltip}\" data-xf-click=\"overlay\"{$target}><i aria-hidden=\"true\"></i></a>";
 
This is the second time I noticed this, so wondering if there's another bug here: there's a missing :p in your code. That is a smilie so that could be relevant, though I don't think it should normally be converted...
 
Which XF version did you get the code from in your first post?

This was fixed in XF 2.0.10 after you reported this in another report.
PHP:
if (!$tooltip)
{
   $tooltip = \XF::phrase('delete');
}
$tooltip = $this->filterForAttr($this, $tooltip, $null);
$html = "<a href=\"{$href}\" class=\"dataList-delete\" data-xf-init=\"tooltip\" title=\"{$tooltip}\" data-xf-click=\"overlay\"{$target}></a>";
 
XF 2.1.0 Beta 2 Templater.php (72464e70a743063e0eab209898748358c36961dc95751e1a584f15888677d157) line 6377-6381

It is fixed in lines 6600-6605 though.
 
There seems to have been some merging conflict at some point so I was looking at some sort of duplicative method.
 
Back
Top Bottom