Fixed error in regexp to link hashtags.
h3rald h3rald@h3rald.com
Sun, 07 Mar 2010 15:33:24 +0100
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
content/js/feeds.js
→
content/js/feeds.js
@@ -43,8 +43,8 @@ var it = $("<li></li>").addClass('feed-item');
var content = tweet.text .replace(/^h3rald:/, '') .replace(/((http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)/g, '<a href="$1">$1</a>') - .replace(/@([a-zA-Z1-9_]*)/g, '<a href="http://www.twitter.com/$1">@$1</a>') - .replace(/#([a-zA-Z1-9_]*)/g, '<a href="http://www.twitter.com/search?q=%23$1">#$1</a>') + .replace(/@([a-zA-Z0-9_-]*)/g, '<a href="http://www.twitter.com/$1">@$1</a>') + .replace(/#([a-zA-Z0-9_-]*)/g, '<a href="http://www.twitter.com/search?q=%23$1">#$1</a>') var dt = $("<span></span>").addClass('feed-item-date').html(format_date(tweet.created_at)+":"); var tx = $("<span>» </span>").addClass('feed-item-text').html(content); it.append(dt);