Merge pull request #2427 from dannoh/Issue-TranslateEncodedHtml

Issue translate encoded html
This commit is contained in:
Michael Teeuw 2021-01-21 15:10:28 +01:00 committed by GitHub
commit 01ff00fa31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 4 deletions

View File

@ -35,6 +35,7 @@ _This release is scheduled to be released on 2021-04-01._
- Fix Issue with weather forecast icons due to fixed day start and end time (#2221) - Fix Issue with weather forecast icons due to fixed day start and end time (#2221)
- Fix empty directory for each module's main javascript file in the inspector - Fix empty directory for each module's main javascript file in the inspector
- Fix Issue with weather forecast icons unit tests with different timezones (#2221) - Fix Issue with weather forecast icons unit tests with different timezones (#2221)
- Fix issue with unencoded characters in translated strings when using nunjuck template (`Loading …` as an example)
## [2.14.0] - 2021-01-01 ## [2.14.0] - 2021-01-01

View File

@ -176,7 +176,7 @@ var Module = Class.extend({
}); });
this._nunjucksEnvironment.addFilter("translate", function (str, variables) { this._nunjucksEnvironment.addFilter("translate", function (str, variables) {
return self.translate(str, variables); return nunjucks.runtime.markSafe(self.translate(str, variables));
}); });
return this._nunjucksEnvironment; return this._nunjucksEnvironment;

View File

@ -81,7 +81,7 @@
{% endif %} {% endif %}
{% else %} {% else %}
<div class="dimmed light small"> <div class="dimmed light small">
{{ "LOADING" | translate | safe }} {{ "LOADING" | translate }}
</div> </div>
{% endif %} {% endif %}

View File

@ -35,7 +35,7 @@
</table> </table>
{% else %} {% else %}
<div class="dimmed light small"> <div class="dimmed light small">
{{ "LOADING" | translate | safe }} {{ "LOADING" | translate }}
</div> </div>
{% endif %} {% endif %}

View File

@ -24,7 +24,7 @@
</table> </table>
{% else %} {% else %}
<div class="dimmed light small"> <div class="dimmed light small">
{{ "LOADING" | translate | safe }} {{ "LOADING" | translate }}
</div> </div>
{% endif %} {% endif %}