Fixed parsing of double-quotes in tweet text
This commit is contained in:
parent
34b8bc6b58
commit
5c642bd479
1
TODO
1
TODO
|
@ -17,4 +17,3 @@ bugs:
|
|||
considerable tweaks to python-twitter)
|
||||
* "ValueError: list.remove(x): x not in list" when trying to close a tab (error recurred after adding conversation support). Tabs can be reordered, then closed, as a workaround.
|
||||
* Links must be right-clicked on to activate - can't left-click on the link directly. This seems to be a pygtk issue
|
||||
* Double-quotes are not parsed correctly in tweets
|
||||
|
|
|
@ -372,6 +372,7 @@ class TweetBox(gtk.HBox):
|
|||
# and the text
|
||||
new_text = status.text
|
||||
new_text = re.sub(r'&([^;]*?)( |$)', r'&\1\2', new_text)
|
||||
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):
|
||||
new_text = re.sub(r"(http://.*?)( |$)", r'<a href="\1">\1</a>\2', new_text)
|
||||
new_text = re.sub(r'@(.*?)( |$)', r'@<a href="@\1">\1</a>\2', new_text)
|
||||
|
|
Reference in New Issue
Block a user