Fix the filter options being escaped twice (#4032)

Credit to @fansaien.

Reference: https://github.com/octobercms/october/pull/3793.  This commit added the e() function for translation results. 

Because the filter is using the mustache template, and the manual said: All variables are HTML escaped by default. If you want to return unescaped HTML, use the triple mustache: {{{name}}} (https://mustache.github.io/mustache.5.html)

That means the string will be escaped twice. So, I removed the e().
This commit is contained in:
fansaien 2019-01-03 14:04:26 -06:00 committed by Luke Towers
parent ee003c416c
commit 5db5522d4d
1 changed files with 1 additions and 1 deletions

View File

@ -934,7 +934,7 @@ class Filter extends WidgetBase
{
$processed = [];
foreach ($options as $id => $result) {
$processed[] = ['id' => $id, 'name' => e(trans($result))];
$processed[] = ['id' => $id, 'name' => trans($result)];
}
return $processed;
}