diff --git a/helpers/helpers_xxx_file.js b/helpers/helpers_xxx_file.js index 4a7c2369..ff83c466 100644 --- a/helpers/helpers_xxx_file.js +++ b/helpers/helpers_xxx_file.js @@ -535,7 +535,7 @@ function sanitize(value) { function sanitizePath(value) { // Sanitize illegal chars but skip drive if (!value || !value.length) {return '';} const disk = (value.match(/^\w:\\/g) || [''])[0]; - return disk + (disk && disk.length ? value.replace(disk, '') : value).replace(/[\/]/g, '\\').replace(/[|–]/g, '-').replace(/\*/g, 'x').replace(/"/g, '\'\'').replace(/[<>]/g, '_').replace(/[\?:]/g, '').replace(/(?! )\s/g, ''); + return disk + (disk && disk.length ? value.replace(disk, '') : value).replace(/[\/]/g, '\\').replace(/[|–‐—-]/g, '-').replace(/\*/g, 'x').replace(/"/g, '\'\'').replace(/[<>]/g, '_').replace(/[\?:]/g, '').replace(/(?! )\s/g, ''); } function UUID() { diff --git a/helpers/helpers_xxx_tags.js b/helpers/helpers_xxx_tags.js index aa7a45cd..656bb58d 100644 --- a/helpers/helpers_xxx_tags.js +++ b/helpers/helpers_xxx_tags.js @@ -1,5 +1,5 @@ 'use strict'; -//05/06/23 +//21/07/23 include('helpers_xxx.js'); @@ -240,7 +240,7 @@ function checkSort(queryOrSort) { // Must check query too to be sure it's a valid query! function stripSort(query) { let queryNoSort = query; - if (query.match(/ *SORT.*$/)) { + if (query.match(/ *SORT .*$/)) { if (query.match(/ *SORT BY .*$/)) {queryNoSort = query.split(/( *SORT BY ).*$/)[0];} else if (query.match(/ *SORT DESCENDING BY .*$/)) {queryNoSort = query.split(/( *SORT DESCENDING BY ).*$/)[0];} else if (query.match(/ *SORT ASCENDING BY .*$/)) {queryNoSort = query.split(/( *SORT ASCENDING BY ).*$/)[0];}