Skip to content

Commit

Permalink
Needs to match the entire username to be considered a match.
Browse files Browse the repository at this point in the history
Closes hotsh#27 and hotsh#16
  • Loading branch information
wilkie committed Mar 24, 2011
1 parent cb9bf8b commit 59bb47c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/update.rb
Expand Up @@ -29,7 +29,7 @@ def url=(the_url)
def to_html
out = CGI.escapeHTML(text)
out.gsub!(/(^|\s+)@(\w+)/) do |match|
if u = User.first(:username => /#{$2}/i)
if u = User.first(:username => /^#{$2}$/i)
"#{$1}<a href='/users/#{u.username}'>@#{$2}</a>"
else
match
Expand Down

0 comments on commit 59bb47c

Please sign in to comment.