mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-01-26 00:08:25 -05: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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user