all repos — h3rald @ 56e1fa02d25a7150bc0f880ab711cc93cc3ce273

The sources of https://h3rald.com

Fixed error in regexp to link hashtags.
h3rald h3rald@h3rald.com
Sun, 07 Mar 2010 15:33:24 +0100
commit

56e1fa02d25a7150bc0f880ab711cc93cc3ce273

parent

f251c3b3faa2e38d4b34b22c74aeb930bf07fc42

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M content/js/feeds.jscontent/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\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?)/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>&#0187; </span>").addClass('feed-item-text').html(content); it.append(dt);