Do not accept comma to separate regex (#2835)

This commit is contained in:
DL6ER
2023-11-16 22:26:42 +01:00
committed by GitHub
5 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -41,7 +41,8 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
</div>
<div class="row">
<div class="col-md-12">
<p>You can select an existing client or add a custom one by typing into the field above and confirming your entry with <kbd>&#x23CE;</kbd>.</p>
<p>You can select an existing client or add a custom one by typing into the field above and confirming your entry with <kbd>&#x23CE;</kbd>.
Multiple clients can be added by separating each client with a space or comma.</p>
<p>Clients may be described either by their IP addresses (IPv4 and IPv6 are supported),
IP subnets (CIDR notation, like <code>192.168.2.0/24</code>),
their MAC addresses (like <code>12:34:56:78:9A:BC</code>),
+2 -1
View File
@@ -86,7 +86,8 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
<div>
<p><strong>Note:</strong><br>
The domain or regex filter will be automatically assigned to the Default Group.<br>
Other groups can optionally be assigned in the list below (using <b>Group assignment</b>).
Other groups can optionally be assigned in the list below (using <strong>Group assignment</strong>).<br>
You can add multiple entries at once by separating them with spaces (e.g. <code>example.com example.org</code>).
</p>
</div>
<div class="btn-toolbar pull-right" role="toolbar" aria-label="Toolbar with buttons">
+2 -2
View File
@@ -30,7 +30,7 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
<div class="row">
<div class="form-group col-md-6">
<label for="new_address">Address:</label>
<input id="new_address" type="text" class="form-control" placeholder="URL or space-separated URLs" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off">
<input id="new_address" type="text" class="form-control" placeholder="URL" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off">
</div>
<div class="form-group col-md-6">
<label for="new_comment">Comment:</label>
@@ -42,7 +42,7 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
<strong>Hints:</strong>
<ol>
<li>Please run <code>pihole -g</code> or update your gravity list <a href="<?=webhome?>gravity">online</a> after modifying your lists.</li>
<li>Multiple lists can be added by separating each <i>unique</i> URL with a space</li>
<li>Multiple lists can be added by separating each <i>unique</i> URL with a space or comma</li>
<li>Click on the icon in the first column to get additional information about your lists. The icons correspond to the health of the list.</li>
</ol>
<div class="btn-toolbar pull-right" role="toolbar" aria-label="Toolbar with buttons">
+2 -2
View File
@@ -30,7 +30,7 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
<div class="row">
<div class="form-group col-md-6">
<label for="new_name">Name:</label>
<input id="new_name" type="text" class="form-control" placeholder="Group name or space-separated group names">
<input id="new_name" type="text" class="form-control" placeholder="Group name">
</div>
<div class="form-group col-md-6">
<label for="new_comment">Comment:</label>
@@ -41,7 +41,7 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
<div class="box-footer clearfix">
<strong>Hints:</strong>
<ol>
<li>Multiple groups can be added by separating each group name with a space</li>
<li>Multiple groups can be added by separating each group name with a space or comma</li>
<li>Group names can have spaces if entered in quotes. e.g "My New Group"</li>
</ol>
<button type="button" id="btnAdd" class="btn btn-primary pull-right">Add</button>
+1 -1
View File
@@ -509,7 +509,7 @@ function addDomain() {
// Check if the user wants to add multiple domains (space or newline separated)
// If so, split the input and store it in an array
var domains = utils.escapeHtml(domainEl.val()).split(/[\s,]+/);
var domains = utils.escapeHtml(domainEl.val()).split(/\s+/);
// Remove empty elements
domains = domains.filter(function (el) {
return el !== "";