Smile4ever / firefoxaddons

Extend the functionality of Firefox with cool addons
83 stars 20 forks source link

[Neat URL] Fix "=" at the end of an url which contains the char "?" … #84

Closed Bonfi97 closed 6 years ago

Bonfi97 commented 6 years ago

…before the char "!"

Bug

If any url which uses this syntax "protocol://domain/[something]?[something]![something]" is parsed by Neat URL it will be converted into "protocol://domain/[something]?[something]![something]=" (where [something] means any string or nothing). This can be a problem for sites that don't use the syntax "?parameter=value" but have "?" and "!" in their url. The bug occurs also with chars "(",")","?","^","$","\","@","[","]","{","}","|",";" instead of "!".

Fix

A simple hack that deletes the last char of the new url if it is equal to "=" and different from the last one of the original url.

gwarser commented 6 years ago

Can you provide real test case? I cannot confirm.

Git source code is also different from latest release - I cannot confirm on both.

Bonfi97 commented 6 years ago

Just using the url of this page "https://github.com/Smile4ever/firefoxaddons/pull/84" and add "?" and "!" in random place like "https://github.com/Smile4ever/fir?efoxaddons/p!ull/84": if i load this url (without any other add-ons) it will be converted into "https://github.com/Smile4ever/fir?efoxaddons/p!ull/84=" . Firefox 56.0.2 with the last version of Neat URL installed from "https://addons.mozilla.org/it/firefox/addon/neat-url/"

gwarser commented 6 years ago

I see it now. You should patch version 3.2.0. Beta compiled from latest git code is working fine. I hope @Smile4ever will clean it, review, and release soon.

Smile4ever commented 6 years ago

I see it now. You should patch version 3.2.0. Beta compiled from latest git code is working fine. I hope @Smile4ever will clean it, review, and release soon.

There is some bug in the source code of the repository on GitHub which breaks # parameters. If I can fix that (when time allows or receive a pull request for it) I will release the next version.

Smile4ever commented 6 years ago

Since it works already in git, there is no need to apply this pull request.