Consider latin1 non-breaking spaces (aka &160;) as spaces, and omit them from autolinked urls #30

Merged
merged 1 commit into from Sep 21, 2013

3 participants

@tiegz

The non-breaking space (0xA0, &160;,  ) doesn't get counted as a space currently.

Before patch:

> helper.auto_link("http://github.com is great")
=> "<a href=\"http://github.com is\">http://github.com is</a> great" 

After patch:

> helper.auto_link("http://github.com is great")
=> "<a href=\"http://github.com\">http://github.com</a> is great" 
@spilliton

Would be sweet if this handled   as well. I'm currently having this same issue but from CKeditor putting   characters right after urls :)

@xuanxu xuanxu merged commit f523048 into tenderlove:master Sep 21, 2013
@xuanxu
Collaborator

Merged. Thank you @tiegz!

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