Skip to content

Commit 9e82bb3

Browse files
committed
With a validator in place for document names (introduced some time ago) we will not get any new documents with invalid name strings, so we can go back to a simpler regexp for document name urls.
- Legacy-Id: 14473
1 parent 92db803 commit 9e82bb3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ietf/settings.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,11 @@ def skip_unreadable_post(record):
536536
DATE_FORMAT = "Y-m-d"
537537
DATETIME_FORMAT = "Y-m-d H:i T"
538538

539-
540-
DRAFT_NAMES_WITH_DOT = "(draft-[a-z0-9-]+-(ion-sig-uni4\.0|pilc-2\.5g3g|trade-iotp-v1\.0-[a-z]+|msword-template-v2\.0|1240\.his|(ieee)?802\.[0-9a-z.]+(-[a-z0-9-]+)?))"
541539
URL_REGEXPS = {
542540
"acronym": r"(?P<acronym>[-a-z0-9]+)",
543541
"charter": r"(?P<name>charter-[-a-z0-9]+)",
544542
"date": r"(?P<date>\d{4}-\d{2}-\d{2})",
545-
"name": r"(?P<name>([A-Za-z0-9_+-]+?|%s))" % DRAFT_NAMES_WITH_DOT,
543+
"name": r"(?P<name>[A-Za-z0-9._+-]+)",
546544
"document": r"(?P<document>[a-z][-a-z0-9]+)", # regular document names
547545
"rev": r"(?P<rev>[0-9]{1,2}(-[0-9]{2})?)",
548546
"owner": r"(?P<owner>[-A-Za-z0-9\'+._]+@[A-Za-z0-9-._]+)",

0 commit comments

Comments
 (0)