From ae201177b483e9b71d4d26daf1cb95ec24c78d74 Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Wed, 5 Oct 2016 10:42:18 -0300 Subject: [PATCH] Otimiza codigo de filtro de url --- sapl/base/templatetags/common_tags.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py index 57f6e9f81..60cb80f62 100644 --- a/sapl/base/templatetags/common_tags.py +++ b/sapl/base/templatetags/common_tags.py @@ -144,8 +144,6 @@ def str2intabs(value): @register.filter def url(value): - # import ipdb; ipdb.set_trace() - string = value[:8] - if 'http://' in string or 'https://' in string: + if value.startswith('http://') or value.startswith('https://'): return True return False