mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
checkupdates: Ignore xml tags in string content
This allows us to fetch strings like the following: <string name="app_name">foo <xliff:g>bar</xliff:g></string> Up until now, using .text would only return "foo ", but if we use .tostring() with the text method, it converts everything into plain text for us resulting in "foo bar".
This commit is contained in:
parent
79475d055f
commit
4ea5ce8889
@ -911,7 +911,7 @@ def retrieve_string(app_dir, string, xmlfiles=None):
|
||||
def element_content(element):
|
||||
if element.text is None:
|
||||
return ""
|
||||
return element.text.encode('utf-8')
|
||||
return XMLElementTree.tostring(element, encoding='utf-8', method='text')
|
||||
|
||||
for path in xmlfiles:
|
||||
if not os.path.isfile(path):
|
||||
|
Loading…
Reference in New Issue
Block a user