Skip to content

Commit

Permalink
translate: Add missing escaping to language name
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Feb 22, 2022
1 parent 572628c commit f6753a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion weblate/trans/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from django.template.loader import render_to_string
from django.urls import reverse
from django.utils import timezone
from django.utils.html import escape
from django.utils.http import urlencode
from django.utils.safestring import mark_safe
from django.utils.translation import gettext
Expand Down Expand Up @@ -318,7 +319,7 @@ def render(self, name, value, attrs=None, renderer=None, **kwargs):
# Render textare
textarea = super().render(fieldname, val, attrs, renderer, **kwargs)
# Label for plural
label = str(unit.translation.language)
label = escape(unit.translation.language)
if len(values) != 1:
label = f"{label}, {plural.get_plural_label(idx)}"
ret.append(
Expand Down

0 comments on commit f6753a1

Please sign in to comment.