Commit a33a4d7d authored by Michal Čihař's avatar Michal Čihař

Better handle unicode in markup checks

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent a219c28f
......@@ -18,6 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import unicode_literals
from xml.etree import cElementTree
import re
......@@ -93,7 +95,7 @@ class XMLTagsCheck(TargetCheck):
'''
Wrapper for parsing XML.
'''
text = strip_entities(text.encode('utf-8'))
text = strip_entities(text)
return cElementTree.fromstring('<weblate>%s</weblate>' % text)
def check_single(self, source, target, unit):
......
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