An example of <> being used to wrap URLs is when Gmail includes an auto-generated text part of a forwarded email by stripping the HTML and wrapping link URLs in <>.
The existing behaviour happens because we identify a URL by looking for a scheme and assume the URL continues until we encounter a small include list of characters (e.g white spaces and quotes).> was not included there (and we can't use & as a stop character as it's allowed in URLs).
This PR resolves an issue where a trailing
>
would be included in the URL.Before
<http://example.com>
→ <http://example.com>After
<http://example.com>
→ <http://example.com>An example of
<>
being used to wrap URLs is when Gmail includes an auto-generated text part of a forwarded email by stripping the HTML and wrapping link URLs in<>
.The existing behaviour happens because we identify a URL by looking for a scheme and assume the URL continues until we encounter a small include list of characters (e.g white spaces and quotes).
>
was not included there (and we can't use&
as a stop character as it's allowed in URLs).