fix domain regex

This commit is contained in:
Your Name 2021-09-15 10:18:19 +00:00
parent b83fb9665d
commit 3ed68732f3

View file

@ -36,8 +36,8 @@
{% if user.is_authenticated %}
<a href="{% url 'common:home' %}" class="button">{% trans '前往我的主页' %}</a>
{% elif allow_any_site %}
<form action="/users/connect" onsubmit="return /^(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})$/.test($('#domain').val())">
<input type="search" name="domain" id="domain" placeholder="实例地址如mastodon.social (不含@)" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
<form action="/users/connect" onsubmit="return /^(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,})$/.test($('#domain').val())">
<input type="search" name="domain" id="domain" placeholder="实例域名如mastodon.social (不含@)" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
<input type='submit' value="{% trans '授权登录' %}" />
</form>
{% else %}
@ -81,4 +81,4 @@
</script>
{% endif %}
</body>
</html>
</html>