Disallow spaces in attachment slugs

Slugs shouldn't have spaces. It also interferes with using slugs in
shortcodes.
This commit is contained in:
2018-04-03 13:59:18 +02:00
parent cbb5d546ef
commit 67e8e7c082
3 changed files with 32 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ _file_embedded_schema = {
}
}
ATTACHMENT_SLUG_REGEX = '[a-zA-Z0-9_]+'
ATTACHMENT_SLUG_REGEX = r'[a-zA-Z0-9_\-]+'
attachments_embedded_schema = {
'type': 'dict',