-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Profanity fails to properly detect URLs wrapped in <> #1877
Comments
I tried parsing it with |
jubalh
added a commit
that referenced
this issue
Aug 28, 2023
First I tried with g_uri_parse() and g_uri_to_string() but then I learned that GUri validation API is only for things that are part of a proper URL. Let's cut the string at `>` since they are sometimes enclosed in `<>`. Fix #1877
jubalh
added a commit
that referenced
this issue
Sep 4, 2023
First I tried with g_uri_parse() and g_uri_to_string() but then I learned that GUri validation API is only for things that are part of a proper URL. Then used `g_utf8_strchr()` to cut the string at `>` since they are sometimes enclosed in `<>`. Thanks to @jaeckel for providing a proper regex. Fix #1877
jubalh
added a commit
that referenced
this issue
Sep 5, 2023
First I tried with g_uri_parse() and g_uri_to_string() but then I learned that GUri validation API is only for things that are part of a proper URL. Then used `g_utf8_strchr()` to cut the string at `>` since they are sometimes enclosed in `<>`. Thanks to @jaeckel for providing a proper regex from https://stackoverflow.com/questions/43588699/regex-for-matching-any-url-character Fix #1877
jubalh
added a commit
that referenced
this issue
Sep 5, 2023
First I tried with g_uri_parse() and g_uri_to_string() but then I learned that GUri validation API is only for things that are part of a proper URL. Then used `g_utf8_strchr()` to cut the string at `>` since they are sometimes enclosed in `<>`. Thanks to @sjaeckel for providing a proper regex from https://stackoverflow.com/questions/43588699/regex-for-matching-any-url-character Fix #1877
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If an URL is wrapped in <>, e.g.:
profanitys
/url open <tab>
will try expand to/url open https://de.wikipedia.org/wiki/F%C3%BCrst_P%C3%BCckler>)
.I think
<
and>
should not be considered as part of an URL as they are unsafe characters that must be escaped:Expected Behavior
/url open <tab>
with the previous example should expand to/url open https://de.wikipedia.org/wiki/F%C3%BCrst_P%C3%BCckler
.Current Behavior
/url open <tab>
expands to/url open https://de.wikipedia.org/wiki/F%C3%BCrst_P%C3%BCckler>)
.Possible Solution
Steps to Reproduce (for bugs)
Environment
The text was updated successfully, but these errors were encountered: