summaryrefslogtreecommitdiff
path: root/addons/website/static/src/xml/website.editor.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2019-01-30 17:18:07 +0000
committerqsm-odoo <qsm@odoo.com>2019-01-31 17:35:07 +0000
commit0abfaeda96c2eaa868cc7fc5fa1926dfa90fc420 (patch)
tree66ed9aa5125802218c19983ccef296ec209265cd /addons/website/static/src/xml/website.editor.xml
parent43888662ffdd51298d4995c20699a31ef029c39c (diff)
[FIX] website: prevent animation of anchor links with invalid fragment
Also secure the anchor creation to only allow valid names, that is letters, digits, underscores and hyphens. task-1913458 closes odoo/odoo#30701
Diffstat (limited to 'addons/website/static/src/xml/website.editor.xml')
-rw-r--r--addons/website/static/src/xml/website.editor.xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/website/static/src/xml/website.editor.xml b/addons/website/static/src/xml/website.editor.xml
index 5b060389618..46d5de05c12 100644
--- a/addons/website/static/src/xml/website.editor.xml
+++ b/addons/website/static/src/xml/website.editor.xml
@@ -107,7 +107,10 @@
<label class="col-form-label col-md-3" for="anchorName">Choose an anchor name</label>
<div class="col-md-9">
<input type="text" class="form-control o_input_anchor_name" id="anchorName" t-attf-value="#{currentAnchor}" placeholder="Anchor name"/>
- <div class="invalid-feedback">The chosen name already exists</div>
+ <div class="invalid-feedback">
+ <p class="d-none o_anchor_not_valid">The chosen name is not valid (use only a-Z A-Z 0-9 - _)</p>
+ <p class="d-none o_anchor_already_exists">The chosen name already exists</p>
+ </div>
</div>
</div>
</div>