-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Custom Rules #70
Comments
Hi @KibaNoOu, do you have an example of a URL which is not properly cleaned, please? Also what do you expect of custom rules? Is it okay to just enter exact parameter names to be removed or do you require something more sophisticated like regular expressions? |
Hi Sven, And would be great to have both exact parameter and regular expression. Keep up the good work! |
In this case I could add a specific sanitizer for eBay links if you tell me which parameters can be safely removed. Regarding custom rules and regular expressions: Regex are very powerful. Allowing users to specify regex rules could potentially break the functionality of the application if there is an error in the expression. I need to think about how to deal with this possibility. |
For the eBay sanitizier everything after the first ? should be discarded. To This: Regarding the Regex, you could hide it behind advanced option so only who really wants that function should enable it with all the warning of course. |
The eBay sanitizer is available in version 1.2.0. |
I'm interested by a feature of "custom rules" too :) Details:
In this example the URL is clean (www.google.com) but in the real life the extracted URL needs probably to be sanitized to be usable :) |
@KibaNoOu @brsysadmin I've been thinking about the custom rules feature. Please provide your feedback in the discussion item. |
@gpsnomad's suggestion in #162 (reply in thread) might be a good stopgap until this is finalized:
|
Could be a really simple but effective solution! |
@TPS @KibaNoOu The thing is, we don't know for sure what parameters could be removed without breaking an URL. Of course we could remove all query parameters from an URL but some URLs, like the Amazon product link from a shopping cart, encode some optional parameters in path arguments (see |
That's why, as a stopgap, it'd be worth making stripping everything unknown a function (like E.g., for Amazon, it's increasely evident that almost any of their product URLs can be rewritten into 1 format just keeping the 1 ASIN parameter, but, the non-product Amazon URLs, 1 can just strip everything |
There's this app which allows custom rules, open source and also written in Kotlin. Maybe it could be used for reference? |
@NikunjKhangwal Oh wow that is a nice one too. |
Yeah |
Hi,
Would be possible to add custom rules,
because sometimes the app doesn't clean residual paramter of the url like the one after a "?"
The text was updated successfully, but these errors were encountered: