Merge pull request #870 from not-my-profile/autocomplete-off

preferences: Set autocomplete=off for form
This commit is contained in:
Markus Heiser 2022-02-04 20:29:15 +00:00 committed by GitHub
commit e5071e5972
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -94,7 +94,7 @@
<div> <div>
<h1>{{ _('Preferences') }}</h1> <h1>{{ _('Preferences') }}</h1>
<form method="post" action="{{ url_for('preferences') }}" id="search_form"> <form method="post" action="{{ url_for('preferences') }}" id="search_form" autocomplete="off">
<!-- Nav tabs --> <!-- Nav tabs -->
<ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist"> <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">

View file

@ -98,7 +98,7 @@
{% block content %} {% block content %}
<h1>{{ _('Preferences') }}</h1> <h1>{{ _('Preferences') }}</h1>
<form id="search_form" method="post" action="{{ url_for('preferences') }}"> <form id="search_form" method="post" action="{{ url_for('preferences') }}" autocomplete="off">
{{ tabs_open() }} {{ tabs_open() }}

View file

@ -186,7 +186,7 @@ class ViewsTestCase(SearxTestCase):
def test_preferences(self): def test_preferences(self):
result = self.app.get('/preferences') result = self.app.get('/preferences')
self.assertEqual(result.status_code, 200) self.assertEqual(result.status_code, 200)
self.assertIn(b'<form method="post" action="/preferences" id="search_form">', result.data) self.assertIn(b'<form method="post" action="/preferences" id="search_form" autocomplete="off">', result.data)
self.assertIn(b'<label class="col-sm-3 col-md-2" for="categories">Default categories</label>', result.data) self.assertIn(b'<label class="col-sm-3 col-md-2" for="categories">Default categories</label>', result.data)
self.assertIn(b'<label class="col-sm-3 col-md-2" for="locale">Interface language</label>', result.data) self.assertIn(b'<label class="col-sm-3 col-md-2" for="locale">Interface language</label>', result.data)