Restricting characters allowed in webpaths


(Douglas (@finnatic at @waikato)) #1

What options are there for restricting characters allowed in webpaths?

We use the default (?) System Web Path Separator of a ‘-’ to replace spaces, and what would be really nice is a blacklist of characters we want removed in the creation of a webpath from an asset name.

With our systems & sites we have a lot of distributed authors, many of whom know very little about what makes a good url. There are a lot of valid characters that are allowable in urls, including some like full stops ‘.’ that you may or may not want to necessarily allow. A url that ends with a full stop, copied into email may see the email client treat the full stop as being separate of the url. That results in people complaining of broken links, quick updates with remaps added etc.


(Byrne) #2

I know there is the separator as you have suggested.
I agree it would be nice to have a regex replace in the system settings.

But in the mean time you could always use a tigger.
This add web path action is targeting create, and taking the asset_web_path - and preg replacing using the regex asset.

You would need to test this pretty well but my initial try worked with out any hassle


(Bart Banda) #3

There is a feature request in squizmap at the moment that has some comments around a feature for this.
https://squizmap.squiz.net/matrix/8456
Feel free to add your thoughts and suggestions there to help us reach a specification quicker.


(Douglas (@finnatic at @waikato)) #4

Thanks Bart - will add some thoughts from our side of the Tasman, but I suspect they’ll mirror those from our colleagues across the waves.