This commit is contained in:
Mel O'Hagan 2023-01-10 16:57:49 +00:00
parent 293efae980
commit dd4fbd075a
1 changed files with 10 additions and 6 deletions

View File

@ -117,15 +117,19 @@
) )
} }
function checkQueryName(inputUrl = null) { function cleanUrl(inputUrl) {
if (query && (!query.name || query.flags.urlName)) { return (
query.flags.urlName = true
query.name =
url url
?.replace(/(http)|(https)|[{}:]/g, "") ?.replace(/(http)|(https)|[{}:]/g, "")
?.replaceAll(".", "_") ?.replaceAll(".", "_")
?.replaceAll("/", " ") ?.replaceAll("/", " ")
?.trim() || inputUrl ?.trim() || inputUrl
)
}
function checkQueryName(inputUrl = null) {
if (query && (!query.name || query.flags.urlName)) {
query.flags.urlName = true
query.name = cleanUrl(inputUrl)
} }
} }