feat: accepting dot in the archive item name

This commit is contained in:
danilo silva 2020-11-13 15:57:04 +00:00
parent c7dbc916b3
commit bb1fe91af0

View file

@ -50,8 +50,8 @@ function validateArchiveUrl(url) {
try { try {
const archiveUrl = new URL(url); const archiveUrl = new URL(url);
var urlPattern = new RegExp("(http|https)://archive.org/details/[a-zA-Z0-9_-]*$") var urlPattern = new RegExp("(http|https)://archive.org/details/[a-zA-Z0-9\._-]*$")
if (!urlPattern.test(url) ){ if (!urlPattern.test(url) ) {
throw 'Paste and archive.org url'; throw 'Paste and archive.org url';
} }
} catch (e) { } catch (e) {