Skip to content

Commit

Permalink
In columns.AbbrColumn, make sure there is no ' in tag title or it…
Browse files Browse the repository at this point in the history
… is not rendered correctly in the browser, #MPMPHAI-41
  • Loading branch information
gbastien committed Sep 13, 2019
1 parent 26700e4 commit 2bb366e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Changelog
2.7 (unreleased)
----------------

- Nothing changed yet.

- In `columns.AbbrColumn`, make sure there is no `'` in tag title or it is not
rendered correctly in the browser.
[gbastien]

2.6 (2019-09-12)
----------------
Expand Down
4 changes: 3 additions & 1 deletion src/collective/eeafaceted/z3ctable/columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,10 @@ def renderCell(self, item):
res = []
for v in value:
try:
tag_title = self._cached_full_vocab_instance.getTerm(v).title
tag_title = tag_title.replace("'", "'")
res.append(u"<abbr title='{0}'>{1}</abbr>".format(
safe_unicode(self._cached_full_vocab_instance.getTerm(v).title),
safe_unicode(tag_title),
safe_unicode(self._cached_acronym_vocab_instance.getTerm(v).title)))
except LookupError:
# in case an element is not in the vocabulary, add the value
Expand Down

0 comments on commit 2bb366e

Please sign in to comment.