Skip to content

Commit 21249e1

Browse files
committed
fix: use window.URL to avoid document.URL shadowing in inline handler
1 parent bc282c4 commit 21249e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

templates/_footer_lang.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="footer-lang">
22
<label for="lang-select" class="sr-only">{{ t_language }}</label>
3-
<select id="lang-select" class="lang-select" autocomplete="off" onchange="if(this.value){var u=new URL(this.value,window.location.origin);u.search=window.location.search;window.location.href=u.href}">
3+
<select id="lang-select" class="lang-select" autocomplete="off" onchange="if(this.value){var u=new(window.URL)(this.value,window.location.origin);u.search=window.location.search;window.location.href=u.href}">
44
{% for l in all_locales %}
55
<option value="/{{ l.tag() }}"{% if *l == locale %} selected{% endif %}>{{ l.name() }}</option>
66
{% endfor %}

0 commit comments

Comments
 (0)