Skip to content

Commit

Permalink
Merge branch 'master' into pyup-scheduled-update-10-30-2017
Browse files Browse the repository at this point in the history
* master:
  Fix bug due to bleach upgrade.
  Update bleach from 2.0.0 to 2.1.1
  Update jinja2 from 2.9.6 to 2.10
  Update sqlalchemy from 1.1.14 to 1.1.15
  • Loading branch information
Koen Van Daele committed Nov 19, 2017
2 parents 828d5e1 + 25b82cd commit c994347
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion atramhasis/validators.py
Expand Up @@ -29,7 +29,18 @@ class Label(colander.MappingSchema):


def html_preparer(value):
return bleach.clean(value, tags=['strong', 'em', 'a'], strip=True)
'''
Prepare the value by stripping all html except certain tags.
:param value: The value to be cleaned.
:rtype: str
'''
try:
return bleach.clean(value, tags=['strong', 'em', 'a'], strip=True)
except TypeError as e:
# Trying to clean a non-string
# Ignore for now so it can be caught later on
return value


class Note(colander.MappingSchema):
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Expand Up @@ -20,13 +20,13 @@ skosprovider_heritagedata==0.3.1
language-tags==0.4.3

# sqlalchemy
sqlalchemy==1.1.14
sqlalchemy==1.1.15
zope.sqlalchemy==0.7.7
transaction==2.1.2
psycopg2==2.7.3.2

# jinja2
jinja2==2.9.6
jinja2==2.10
pyramid-jinja2==2.7
Babel==2.5.1

Expand Down

0 comments on commit c994347

Please sign in to comment.