#4109·wagtail

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

  1. Set TAG_SPACES_ALLOWED = False in your settings
  2. Open the editing interface for a document or a page with the default Wagtail tags input
  3. Copy few words with a space inside into clipboard
  4. Paste into the tag input
  5. 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)