def __call__(self, value): return mark_safe('<a href="{}" target="_blank">{}</a>'.format( self.url_pattern.format(urlquote(value, '/@+')), self.value_pattern.format(escape(value)) ))