Smile4ever / Neat-URL

Neat URL cleans URLs, removing parameters such as Google Analytics' utm parameters.
Other
631 stars 37 forks source link

Custom filter not working #242

Closed azev closed 3 years ago

azev commented 4 years ago

https://www.mercadolivre.com.br/

Dirty link: https://produto.mercadolivre.com.br/MLB-1180117552-suporte-cmera-seguranca-cftv-infra-sensor-iva-aluminio-40c-_JM#reco_item_pos=3&reco_backend=navigation_trend&reco_backend_type=function&reco_client=home_navigation-trend-recommendations&reco_id=7f7abfaf-bd7b-442c-a6ee-a93ef4983d29&c_id=/home/navigation-trends-recommendations/element&c_element_order=4&c_uid=dd7ed7ec-3c75-4a25-b7dd-806aad69f2dd

Clean link: https://produto.mercadolivre.com.br/MLB-1180117552-suporte-cmera-seguranca-cftv-infra-sensor-iva-aluminio-40c-_JM

Smile4ever commented 4 years ago

What parameters are you using? Where (=which field) did you put them?

azev commented 4 years ago

https://i.imgur.com/8aOTGPL.png

Smile4ever commented 4 years ago

You have to put the parameters in Blocked parameters, not in the override list.

azev commented 4 years ago

Still doesn't work. I tried both.

ghost commented 3 years ago

I confirm. But if in the above mentioned link the first # is replaced with ? then reco_* parameters are all correctly blocked. The everlasting problem of parameters starting with # ...

Smile4ever commented 3 years ago

Please see the comment from @Cade66 for the solution

ghost commented 3 years ago

Seems there's been a misunderstanding.

My comment above was not a solution : it only confirmed that the link mentioned by @azev was indeed not handled by Neat Url :

https://produto.mercadolivre.com.br/MLB-1180117552-suporte-cmera-seguranca-cftv-infra-sensor-iva-aluminio-40c-_JM#reco_item_pos=3&reco_backend=navigation_trend&reco_backend_type=function&reco_client=home_navigation-trend-recommendations&reco_id=7f7abfaf-bd7b-442c-a6ee-a93ef4983d29&c_id=/home/navigation-trends-recommendations/element&c_element_order=4&c_uid=dd7ed7ec-3c75-4a25-b7dd-806aad69f2dd

But, that Neat URL would have worked correctly if the first # had been a ? :

https://produto.mercadolivre.com.br/MLB-1180117552-suporte-cmera-seguranca-cftv-infra-sensor-iva-aluminio-40c-_JM?reco_item_pos=3&reco_backend=navigation_trend&reco_backend_type=function&reco_client=home_navigation-trend-recommendations&reco_id=7f7abfaf-bd7b-442c-a6ee-a93ef4983d29&c_id=/home/navigation-trends-recommendations/element&c_element_order=4&c_uid=dd7ed7ec-3c75-4a25-b7dd-806aad69f2dd

In other words, Neat URL doesn't clean correctly a link of the form https://example.com#parameter= but cleans perfectly https://example.com?parameter=

This post, therefor, doesn't seem to deserve the invalid tag.

Smile4ever commented 3 years ago

The documentation (README) mentions that "query parameters" that come after a hash sign, need to have #?parameter instead of parameter.

ghost commented 3 years ago

The documentation (README) mentions that "query parameters" that come after a hash sign, need to have #?parameter instead of ?parameter.

My fault! READMEs are too often neglected. Hence : the post is indeed invalid! Maybe if this README had been included in the response to @azev that it would have been clearer. Thanks.