fix unicode issues
This commit is contained in:
parent
926d9a352e
commit
e673e26c53
2 changed files with 3 additions and 4 deletions
|
@ -61,10 +61,9 @@ class Annotation(models.Model):
|
|||
set_public_id = not self.id or not self.public_id
|
||||
layer = self.get_layer()
|
||||
if self.value:
|
||||
self.value = utils.cleanup_value(self.value, self.layer['type'])
|
||||
self.value = utils.cleanup_value(self.value, layer['type'])
|
||||
self.findvalue = ox.stripTags(self.value).strip()
|
||||
sortvalue = self.findvalue
|
||||
sortvalue = sort_string(sortvalue)
|
||||
sortvalue = sort_string(self.findvalue)
|
||||
if sortvalue:
|
||||
self.sortvalue = sortvalue[:1000]
|
||||
else:
|
||||
|
|
|
@ -14,5 +14,5 @@ def cleanup_value(value, layer_type):
|
|||
return value
|
||||
|
||||
def sanitize_fragment(html):
|
||||
return html5lib.parseFragment(html).toxml()
|
||||
return html5lib.parseFragment(html).toxml().decode('utf-8')
|
||||
|
||||
|
|
Loading…
Reference in a new issue