twitter/twitter-text-rb — Issue #31: URLs are being mangled
Author: gavinlaking
Created: 2012-01-11 14:54:29+00:00
State: open

Hi,

I've just started using this gem, and am encountering a problem when auto_linking URLs. I've added 'include Twitter::AutoLink' into my ApplicationHelper, however when I do the following, I'm getting unexpected results:

text = "@gavinlaking"
"@gavinlaking"

auto_link(text)
"@gavinlaking"

Okay so far... so let's try a URL:

text = "http://www.example.com"
"http://www.example.com"
auto_link(text)
"\"http://www.w3.org/1999/xhtml\", \"xml:lang\"=<{:rel=>\"nofollow\", :class={:rel=<\"nofollow\", :class=>nil}}/a<"

It looks like the brackets are the wrong way around, and also we have a hash in the middle of our HTML.

Any ideas?