Possible to add tags with spaces when TAG_SPACES_ALLOWED = False
Author: m1kolaCreated Dec 8, 2017Updated Sep 29, 2026
Labelstype:BugDocumentationcomponent:Frontendcomponent:Tagging
Issue Summary
Possible to add tags with spaces when TAG_SPACES_ALLOWED = False.
Steps to Reproduce
- Set
TAG_SPACES_ALLOWED = Falsein your settings - Open the editing interface for a document or a page with the default Wagtail tags input
- Copy few words with a space inside into clipboard
- Paste into the tag input
- Hit the save/publish button
Result: Tag with a space will be saved into a database
We need to prevent copy-pasting when TAG_SPACES_ALLOWED is False on front-end and/or implement validation on back-end.
Technical details
- Wagtail version: Wagtail 1.13.1
- Browser version: 62.0.3202.94 (64-bit, MacOS 10.13.1)
Source: wagtail/wagtail