url image preview. remove qip bbcode in the url
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Url image preview
|
name: Url image preview
|
||||||
short_name: url_image_preview
|
short_name: url_image_preview
|
||||||
version: 0.4
|
version: 0.5
|
||||||
description: Url image preview in chatbox.
|
description: Url image preview in chatbox.
|
||||||
Based on patch in ticket #5300:
|
Based on patch in ticket #5300:
|
||||||
http://trac.gajim.org/attachment/ticket/5300.
|
http://trac.gajim.org/attachment/ticket/5300.
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ class Base(object):
|
|||||||
def print_special_text(self, special_text, other_tags, graphics=True):
|
def print_special_text(self, special_text, other_tags, graphics=True):
|
||||||
if not gajim.interface.basic_pattern_re.match(special_text):
|
if not gajim.interface.basic_pattern_re.match(special_text):
|
||||||
return
|
return
|
||||||
|
# remove qip bbcode
|
||||||
|
special_text = special_text.rsplit('[/img]')[0]
|
||||||
|
|
||||||
name, extension = os.path.splitext(special_text)
|
name, extension = os.path.splitext(special_text)
|
||||||
if extension.lower() not in EXTENSIONS:
|
if extension.lower() not in EXTENSIONS:
|
||||||
|
|||||||
Reference in New Issue
Block a user