Commit 96271b6d authored by Bezleputh's avatar Bezleputh Committed by Romain Bignon

[filters] manage default in Dict filter

parent 38a550d2
......@@ -184,7 +184,7 @@ class Dict(Filter):
for el in selector.split('/'):
if el not in content:
raise ParseError()
return None
content = content.get(el)
......@@ -195,7 +195,10 @@ class Dict(Filter):
return selector
def filter(self, txt):
return txt
if txt is not None:
return txt
return self.default_or_raise(ParseError())
class CleanHTML(Filter):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment