# HG changeset patch # User Thierry Florac # Date 1548270977 -3600 # Node ID 49da29eef08687bf515ad75908096ae69b7fc1c5 # Parent 6027118fcde92a14944f089b56d13b8ca4399360 Updated mailto: link inner title diff -r 6027118fcde9 -r 49da29eef086 src/pyams_content/component/links/__init__.py --- a/src/pyams_content/component/links/__init__.py Wed Jan 23 19:45:27 2019 +0100 +++ b/src/pyams_content/component/links/__init__.py Wed Jan 23 20:16:17 2019 +0100 @@ -9,11 +9,12 @@ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # -from pyramid.encode import url_quote - __docformat__ = 'restructuredtext' +from html import escape + +from pyramid.encode import url_quote from zope.interface import implementer from zope.schema.fieldproperty import FieldProperty from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary @@ -293,7 +294,10 @@ @property def inner_title(self): - return self.context.get_url() + if self.context.address_name: + return escape('{} <{}>'.format(self.context.address_name, self.context.address)) + else: + return self.context.address @property def human_size(self):