Closed (fixed)
Project:
Activity Stream
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2009 at 11:44 UTC
Updated:
21 Nov 2009 at 06:10 UTC
If you write links that has hashmarks in it, the activitystream_twitter_makelinks() produces links that has an tag in an another tag.
The error is in the activitystream_twitter_makelinks() function at the 81th line:
$text = preg_replace('/#(\w*)/', '<a href="http://hashtags.org/tag/\\1/">#\\1</a>', $text);
http://example.com/#lol
will become
<a href="http://example.com/#lol">http://example.com/<a href="http://hashtags.org/tag/#lol>#lol</a></a>
Comments
Comment #1
akalsey commentedI think the only proper way to handle this would be to only link a hashtag if it is preceded by whitespace or begins the string. This will mean that if someone were to say #hash#tag without a space separating them then only #hash would get linked and #tag would be ignored. I cant imagine that this is a common case.
Fixed in CVS rev 1.2.2.5.
This fix is going into 2.x only.