Skip to content

Add support for parentheses in uri (master)#7

Open
yoyoma2 wants to merge 1 commit intojpfleury:v4from
yoyoma2:master
Open

Add support for parentheses in uri (master)#7
yoyoma2 wants to merge 1 commit intojpfleury:v4from
yoyoma2:master

Conversation

@yoyoma2
Copy link
Copy Markdown

@yoyoma2 yoyoma2 commented Oct 2, 2017

Since parentheses are legal characters in uri's, the plugin should accept them. Here's an example that used to fail but now works with "Browse to".

https://m.costco.ca/T-Fal-20.8-L-(22-qt.)-Pressure-Cooker-Canner-.product.100340458.html

In case the v2 pull request doesn't get in, here's the same change in master.

@jpfleury
Copy link
Copy Markdown
Owner

jpfleury commented Oct 2, 2017

Thanks a lot. I'll look at this very soon.

@jpfleury jpfleury changed the base branch from master to v4 May 20, 2025 00:42
@jpfleury
Copy link
Copy Markdown
Owner

Thanks for the contribution. Indeed, parentheses are valid characters in URIs according to the spec. However, including them in the regular expression used to detect URIs breaks common syntaxes, such as Markdown links [hello](https://example.com/hello) or texts where the URL is wrapped in parentheses. In these cases, the plugin would end up capturing parentheses that are not actually part of the URI.

@yoyoma2
Copy link
Copy Markdown
Author

yoyoma2 commented May 20, 2025

Understandable. I guess there could be an "Avoid ambiguous characters" checkbox like bitwarden uses in its password generator. The linux laptop I ran into this issue with has since been recycled so no longer relevant to me. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants