From 064d8cea4441774079ecbcf46474f179ec60a598 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 12 Feb 2020 09:14:42 -0800 Subject: [PATCH] =?UTF-8?q?fix=20#1174=20=E2=80=93=20Allow=20=5F~=20in=20u?= =?UTF-8?q?rl=20slugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/models/Document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models/Document.js b/server/models/Document.js index 4cd42c5fc..6bb9837a4 100644 --- a/server/models/Document.js +++ b/server/models/Document.js @@ -16,7 +16,7 @@ import Revision from './Revision'; const Op = Sequelize.Op; const Markdown = new MarkdownSerializer(); -const URL_REGEX = /^[a-zA-Z0-9-]*-([a-zA-Z0-9]{10,15})$/; +const URL_REGEX = /^[0-9a-zA-Z-_~]*-([a-zA-Z0-9]{10,15})$/; const DEFAULT_TITLE = 'Untitled'; slug.defaults.mode = 'rfc3986';