Teach SafeHtml.linkify() to ignore trailing ">"

Because we are running linkify on the HTML safe URL, a string
such as "<http://foo>" is actually appearing to our regex as the
string "&lt;http://foo&gt;".  As "&gt;" is a valid sequence of URL
characters we were pulling the "&gt;" into the URL, when in fact
our intent was to leave it out.

We now skip "&lt;" and "&gt;" within a URL, as these are meant to
be read by the browser after parsing as "<" and ">", and these are
not considered to be part of the URL.

Bug: GERRIT-277
Change-Id: Ide9a63c3c998eac6a3ce9f23066668c2e7a9aba6
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed
tree: 6abb89a557e767638372edb4591ab026801fa250
  1. .gitignore
  2. .settings/
  3. COPYING
  4. GoogleFormat.xml
  5. pom.xml
  6. src/