-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix multiple sharp signs in URIs #356
base: master
Are you sure you want to change the base?
Conversation
Home site validation used the URL regexp, but didn't anchor it. Because of this it was possible to add text before or after the URL and have it considered valid. For instance, this was considered a valid homesite value: "lorem ipsum https://example.org/#foo#bar dolor sit amet" It is possible to fix it by anchoring the regexp, but IMO it is wiser to use the same URL validator used at other places in the site. Hence this commit replaces this validation with the `http_url` validator used for news links and bookmarks. https://linuxfr.org/suivi/impossible-de-mettre-un-lien-vers-un-salon-matrix-dans-les-liens-d-une-depeche#comment-1911550
Beware of the invisible merge conflict with #355: the change won't cause a conflict but it won't work due to renaming the validator. |
rename HttpUrlValidator as UriValidator
…ency' into fix-uri-fragement-validation
This is used to revert the workaround applied on fragment part of the URI to accept multiple sharp sign in the URI. This decoding of sharp sign in the fragment part allows to keep visual match with the user input.
So the bookmark model is the only leader the validation of the link. Thus the protocol validation is moved to the model too.
0f0164c
to
51b2fd9
Compare
Indeed, I've just merged #355 in the current PR so @Oumph will just need to merge this one as the conflict is resolved. I've just added commits to add an |
rename HttpUrlValidator as UriValidator
Suivi: https://linuxfr.org/suivi/impossible-de-mettre-un-lien-vers-un-salon-matrix-dans-les-liens-d-une-depeche