tenderlove/rails_autolink

  should not become part of the URL

collimarco opened this issue · 0 comments

Let's say that you have some user content like this:

a link https://example.com  and other text.

Actual:

a link <a href="https://example.com&nbsp;">https://example.com&nbsp;</a> and other text.

The link is broken in this case.

Expected:

a link <a href="https://example.com">https://example.com</a>&nbsp; and other text.

The &nbsp; after the link should be considered whitespace and not included in the link.

Why it is necessary

Some Javascript text editors like Editor.js or other WYSIWYG editors insert &nbsp; sometimes (e.g. when the user enters multiple spaces).