Fixed source field sometimes showing up as broken HTML...
This commit is contained in:
@ -410,8 +410,13 @@ class TweetBox(gtk.HBox):
|
||||
|
||||
# Set the header
|
||||
if status.source is not None:
|
||||
self.app_url = re.sub(r'.*<a href=\"(.*?)\".*', r'\1', status.source)
|
||||
app_name = re.sub(r'.*<a.*?>(.*)</a>.*', r'\1', status.source)
|
||||
source = status.source
|
||||
if re.match(r'<', source):
|
||||
metalabel = gtk.Label()
|
||||
metalabel.set_markup(status.source)
|
||||
source = metalabel.get_text()
|
||||
self.app_url = re.sub(r'.*<a href=\"(.*?)\".*', r'\1', source)
|
||||
app_name = re.sub(r'.*<a.*?>(.*)</a>.*', r'\1', source)
|
||||
self.app_button.set_label(app_name)
|
||||
self.app_button.show()
|
||||
self.via_label.show()
|
||||
|
Reference in New Issue
Block a user