1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

More strict string search regex

This commit is contained in:
Daniel Martí 2014-05-27 10:10:15 +02:00
parent 5bbbda71a3
commit 9301c50e3b

View File

@ -712,7 +712,7 @@ def retrieve_string(app_dir, string, xmlfiles=None):
string_search = None string_search = None
if string.startswith('@string/'): if string.startswith('@string/'):
string_search = re.compile(r'.*"' + string[8:] + '".*?>([^<]+?)<.*').search string_search = re.compile(r'.*name="' + string[8:] + '".*?>([^<]+?)<.*').search
elif string.startswith('&') and string.endswith(';'): elif string.startswith('&') and string.endswith(';'):
string_search = re.compile(r'.*<!ENTITY.*' + string[1:-1] + '.*?"([^"]+?)".*>').search string_search = re.compile(r'.*<!ENTITY.*' + string[1:-1] + '.*?"([^"]+?)".*>').search