Merged in [15267] from rcross@amsl.com:

Fix issue with decorator on utils.html.remove_tags().
 - Legacy-Id: 15270
Note: SVN reference [15267] has been migrated to Git commit 0d255f7d0874f01163f292568e76fa9d830a54e2
This commit is contained in:
Henrik Levkowetz 2018-06-19 21:23:35 +00:00
parent 9fe1820640
commit dbfdb94c34
2 changed files with 46 additions and 1 deletions

View file

@ -1,3 +1,48 @@
ietfdb (6.81.3) ietf; urgency=medium
* Merged in [15248] from rjsparks@nostrum.com:
Improvements to tests after converting to factories suggested by studying
coverage_changes.
* Merged in [15247] from rjsparks@nostrum.com:
Tweaked the color palatte for the agenda editor.
* Removed two instances of log.assertion(); we have enough data on these
now.
* Changed an attribute guard to work with a reverse relationship attribute
(using hasattr()).
* Fixed a broken mailto link on the account edit page.
* Merged in [15238] from rjsparks@nostrum.com:
Use factories for ietf.doc.tests_status_change. Repair previous commit
errors in ietf.doc.tests_material.
* Merged in [15228] from rjsparks@nostrum.com:
Use factories for ietf.doc.tests_downref.
* Merged in [15227] from rjsparks@nostrum.com:
Use factories for ietf.doc.tests_conflict_review.
* Merged in [15226] from rjsparks@nostrum.com:
Use factories for ietf.doc.tests_charter.
* Tweaked unidecode_name() to not produce single-letter ascii surnames
from non-ascii codepoints. The unidecode transliteration is in any case
somewhat arbitrary, and in most cases a real person will tweak the ascii
name of his account. When running tests, however, this tweak avoids some
false test failures. And no, it's not simple to fix the draft
author-extraction heuristics to deal well with single-letter surnames.
* Added a guard against trying to access attributes of a None object.
* Merged in [15225] from rjsparks@nostrum.com:
Use factories for ietf.doc.tests_draft.
-- Henrik Levkowetz <henrik@levkowetz.com> 14 Jun 2018 13:11:49 +0000
ietfdb (6.81.2) ietf; urgency=medium
This is the third in a small series of releases to address compliance with

View file

@ -31,11 +31,11 @@ def unescape(text):
"""
return text.replace('&#39;', "'").replace('&quot;', '"').replace('&gt;', '>').replace('&lt;', '<' ).replace('&amp;', '&')
@keep_lazy(six.text_type)
def remove_tags(html, tags):
"""Returns the given HTML sanitized, and with the given tags removed."""
allowed = set(acceptable_tags) - set([ t.lower() for t in tags ])
return bleach.clean(html, tags=allowed)
remove_tags = keep_lazy(remove_tags, six.text_type)
# ----------------------------------------------------------------------
# Html fragment cleaning