Open
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
Contributor
|
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
Member
Author
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 |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rename HttpUrlValidator as UriValidator
Suivi: https://linuxfr.org/suivi/impossible-de-mettre-un-lien-vers-un-salon-matrix-dans-les-liens-d-une-depeche