Skip to content

Conversation

@mahemoff
Copy link

This fork adds a twitter option:
linkify('@mahemoff', { twitter: true })
becomes
< a href="http://twitter.com/mahemoff" title="http://twitter.com/mahemoff" > @mahemoff < /a >

(not sure if the angle brackets are about to be mangled when I submit this comment...)

In doing so, there's some refactoring to simplify the way the uber URI regexp is built up.
There's also some basic support for Node and a tiny test (in CoffeeScript).

@mrooney
Copy link
Owner

mrooney commented Sep 15, 2011

Nice, thanks! I'm not the original author, so I'm not too familiar with the core. I was hoping my fork would be merged into the author's but I'm not hopeful at this point, so it is probably safer for people to use this fork due to the XSS fix. How confident are you about these changes / refactorings? If you wouldn't mind telling me how to run the Coffee tests, I'll add one or two myself for our use cases / the XSS.

@mahemoff
Copy link
Author

Yeah, I'm glad I saw your fork and so I began with this. Anyway, I just
added the enhancements as issues to @cowboy's repo, so at least they'll be
tracked.

If you have CoffeeScript installed, just run "coffee test/test.coffee" (tbh
just personal preference using CS for it). Fairly confident, but you know,
there's no real test case with assertions here. That would be great if you
could add the XSS tests :D. If you fancy adding in tests without adding a
proper library, you could use this tiny+dumb test as a basis:
https://github.com/mahemoff/approximate/blob/master/src/test.coffee.

On Fri, Sep 16, 2011 at 12:13 AM, Mike Rooney <
reply@reply.github.com>wrote:

Nice, thanks! I'm not the original author, so I'm not too familiar with the
core. I was hoping my fork would be merged into the author's but I'm not
hopeful at this point, so it is probably safer for people to use this fork
due to the XSS fix. How confident are you about these changes /
refactorings? If you wouldn't mind telling me how to run the Coffee tests,
I'll add one or two myself for our use cases / the XSS.

Reply to this email directly or view it on GitHub:
#1 (comment)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants