Open dsummersl opened 8 years ago
Thank you! I'm not sure this will give properly linked urls in each scenario: when viewing the citygram map, in the email, and when viewing the email in the browser.
Can you confirm that this will lead to properly linked items in each scenario? I'm a bit suspicious that maybe not, as there are no a
tags, so nothing related to linking to strip out.
hmm, good question. I'll check. The main citygram app 'hyperlinks' plain text, so I think...as long as this text is plain text and has a properly formatted URL it should be okay.
Okay! Spent a little time over the weekend on this. You're totally right, this is much more complicated...
hyperlink()
methods - one in javascript (Autolinker.js) and one in ruby (erb I...think). The JS version works great if you have text with a link in it: it will find a link in the text, and wrap an <a>
tag around it. The ruby version does not: it just wraps a link around the full text, which sometimes renders badly.
As per: https://github.com/codeforamerica/citygram/issues/247