aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-11-19 23:05:09 +0100
committerGravatar GitHub <noreply@github.com> 2024-11-19 23:05:09 +0100
commit0f4bcdad9b3bde1cf7724069e774eff198a7169c (patch)
tree5b96a8c9e19d11ba7fd7b35cad70f161927943ef /app
parent6970723aebae7ae90405368e6314e113885cd0de (diff)
Fix HTML pattern in install (#7009)
Slashes now need to be escaped because of `v` mode: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Character_class#v-mode_character_class https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern#overview Edge: > Pattern attribute value [0-9A-Z/a-z_.\-]{1,64}(:[0-9]{2,5})? is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /[0-9A-Z/a-z_.\-]{1,64}(:[0-9]{2,5})?/v: Invalid character in character class Firefox: > Impossible de vérifier <input pattern='[0-9A-Z/a-z_.\-]{1,64}(:[0-9]{2,5})?'> car « /[0-9A-Z/a-z_.\-]{1,64}(:[0-9]{2,5})?/v » n’est pas une expression régulière valide : invalid character in class in regular expression
Diffstat (limited to 'app')
-rw-r--r--app/install.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/install.php b/app/install.php
index 35ee5c295..a7b4ef09c 100644
--- a/app/install.php
+++ b/app/install.php
@@ -551,7 +551,7 @@ function printStep2(): void {
<div class="form-group">
<label class="group-name" for="host"><?= _t('install.bdd.host') ?></label>
<div class="group-controls">
- <input type="text" id="host" name="host" pattern="[0-9A-Z/a-z_.\-]{1,64}(:[0-9]{2,5})?" value="<?=
+ <input type="text" id="host" name="host" pattern="[0-9A-Z\/a-z_.\-]{1,64}(:[0-9]{2,5})?" value="<?=
$_SESSION['bd_host'] ?? $system_default_config->db['host'] ?? '' ?>" tabindex="2" />
</div>
</div>