From 5784d989f5e0318067ca290154b576e5f7d62f49 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 8 Jan 2020 22:08:08 +0530 Subject: [PATCH] Use proper separators on windows --- src/calibre/utils/xml_parse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/utils/xml_parse.py b/src/calibre/utils/xml_parse.py index 6290cfb341..de5cee860d 100644 --- a/src/calibre/utils/xml_parse.py +++ b/src/calibre/utils/xml_parse.py @@ -6,7 +6,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera from lxml import etree -# resolving of SYSTEM entitties is turned off as entities can cause +# resolving of SYSTEM entities is turned off as entities can cause # reads of local files, for example: # ]> @@ -44,7 +44,7 @@ def find_tests(): def test_safe_xml_fromstring(self): templ = ''' ]>&e;''' - external = 'file:///' + self.temp_file + external = 'file:///' + self.temp_file.replace(os.sep, '/') self.assertEqual(etree.fromstring(templ.format(id='SYSTEM', val=external)).text, 'external') for eid, val, expected in ( ('', 'normal entity', 'normal entity'),