From 34465b93235a28d5834f5cad1bf222cc6414ac08 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Tue, 20 Oct 2020 22:04:06 +0200 Subject: [PATCH] Patch unanchored regex --- src/app.mjs | 2 +- src/html/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.mjs b/src/app.mjs index a176586b..b5f81718 100644 --- a/src/app.mjs +++ b/src/app.mjs @@ -129,7 +129,7 @@ if (/^\d+$/.test(value)) query[key] = Number(value) //Parse boolean - if (/^true|false$/.test(value)) + if (/^(?:true|false)$/.test(value)) query[key] = !!value //Parse null if (/^null$/.test(value)) diff --git a/src/html/index.html b/src/html/index.html index 92ef5a45..5bf3a6d1 100644 --- a/src/html/index.html +++ b/src/html/index.html @@ -122,7 +122,7 @@ }, url() { const plugins = Object.entries(this.plugins.enabled) - .filter(([key, value]) => /^languages|followup$/.test(key) ? !value : value) + .filter(([key, value]) => /^(?:languages|followup)$/.test(key) ? !value : value) .map(([key, value]) => `${key}=${+value}`) .join("&") return `${window.location.href}${this.user}${plugins.length ? `?${plugins}` : ""}`