html_for_tweet() does not format hashtag/mentions properly when it is a substring of another #389

Closed
opened 2015-08-15 03:43:01 -07:00 by ping · 0 comments
ping commented 2015-08-15 03:43:01 -07:00 (Migrated from github.com)

Example: Test Twython @google @googlecode #applesauce #apples

HTML generated (with added linebreaks for readability):

Test Twython <a href="https://twitter.com/google" class="twython-mention">@google</a> 
<a href="https://twitter.com/google" class="twython-mention">@google</a>code 
<a href="https://twitter.com/search?q=%23applesauce" class="twython-hashtag">
<a href="https://twitter.com/search?q=%23apples" class="twython-hashtag">#apples</a>auce</a> 
<a href="https://twitter.com/search?q=%23apples" class="twython-hashtag">#apples</a>

image

Example: `Test Twython @google @googlecode #applesauce #apples` HTML generated (with added linebreaks for readability): ``` html Test Twython <a href="https://twitter.com/google" class="twython-mention">@google</a> <a href="https://twitter.com/google" class="twython-mention">@google</a>code <a href="https://twitter.com/search?q=%23applesauce" class="twython-hashtag"> <a href="https://twitter.com/search?q=%23apples" class="twython-hashtag">#apples</a>auce</a> <a href="https://twitter.com/search?q=%23apples" class="twython-hashtag">#apples</a> ``` ![image](https://cloud.githubusercontent.com/assets/104607/9288528/1227381e-437d-11e5-98f8-f44a587a5b2d.png)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: code/twython#389
No description provided.