fix: Incorrect symbols on wiki create article page (#32628)

The message was being double-escaped by React with the
StatusAlertRenderer. This fixes the problem by removing the
first layer of HTML-escaping so it is only escaped once.
This commit is contained in:
Dmytro
2023-07-11 00:25:06 +03:00
committed by GitHub
parent 00b1ce28b9
commit bb4beab5eb

View File

@@ -76,11 +76,15 @@
{% block wiki_breadcrumbs %}{% endblock %}
{% if messages %}
{% comment %}
The message is not actually safe, but StatusAlertRenderer uses react which adds escaping,
so marking as safe keeps the message from being double-escaped.
{% endcomment %}
{% for message in messages %}
<div id="alert_stat_bar"></div>
<script type="text/javascript">
new StatusAlertRenderer(
"{{ message }}",
"{{ message|safe }}",
"#alert_stat_bar",
".nav nav-tabs"
);