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:
parent
ee003c416c
commit
5db5522d4d
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue