diff --git a/twitterwidgets.py b/twitterwidgets.py index d608042..c5b2f3a 100644 --- a/twitterwidgets.py +++ b/twitterwidgets.py @@ -471,10 +471,10 @@ class TweetBox(gtk.HBox): new_text = re.sub(r'"([^;]*?)( |$)', r'"\1\2', new_text) if gtk.gtk_version[0] > 2 or (gtk.gtk_version[0] == 2 and gtk.gtk_version[1] >= 18): # Make URLs into links - new_text = re.sub(r"(http://.*?)([^0-9a-zA-Z.~/_-]|$)", r'\1\2', new_text) + new_text = re.sub(r"(http://.*?)([^0-9a-zA-Z.~/_?&-]|$)", r'\1\2', new_text) # Make @ or # refs into links, to be used internally - new_text = re.sub(r'@(.*?)([^0-9a-zA-Z_]|$)', self._make_user_link, new_text) - new_text = re.sub(r'#(.*?)([^0-9a-zA-Z_-]|$)', self._make_hashtag_link, new_text) + new_text = re.sub(r'@(.*?)([^0-9a-zA-Z\'_]|$)', self._make_user_link, new_text) + new_text = re.sub(r'#(.*?)([^0-9a-zA-Z\'_-]|$)', self._make_hashtag_link, new_text) self.text.set_markup(new_text) # If this is in reply to something, set appropriate label