Filters are only processed after the string being operated on has been filename-sanitized. This is a problem when trying to do Filter operations, as sanitized characters may be the only identifiers.
For instance, I was attempting to use the pathname, breaking it by the / marks and taking each part to form unique filenames, similar to this: ${tabUrl[pathname]|replace:/\/([^\/]+)\/[^\/]+\/([^\/]+)$/:$2-$1} However, as the string is pre-sanitized, the separators are missing, and the string is just one blob of text in the format of [a-zA-Z0-9-]+. Ideally, sanitizing should take place post-filtering, so potentially sanitize-able landmarks are retained for the filter process.
Filters are only processed after the string being operated on has been filename-sanitized. This is a problem when trying to do Filter operations, as sanitized characters may be the only identifiers.
For instance, I was attempting to use the
pathname
, breaking it by the/
marks and taking each part to form unique filenames, similar to this:${tabUrl[pathname]|replace:/\/([^\/]+)\/[^\/]+\/([^\/]+)$/:$2-$1}
However, as the string is pre-sanitized, the separators are missing, and the string is just one blob of text in the format of[a-zA-Z0-9-]+
. Ideally, sanitizing should take place post-filtering, so potentially sanitize-able landmarks are retained for the filter process.