From: Daniel Martí Date: Wed, 10 Jul 2013 10:01:40 +0000 (+0200) Subject: Auto Names: handle escaped \' and nested strings X-Git-Tag: 0.1~511 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6adc661e0e8fe59ff0612c393732d40ac440126b;p=fdroidserver.git Auto Names: handle escaped \' and nested strings --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index ebf23eb9..566284b3 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -868,7 +868,10 @@ def retrieve_string(app_dir, string_id): for line in file(xmlfile): matches = string_search(line) if matches: - return matches.group(1) + s = matches.group(1) + if s.startswith('@string/'): + return retrieve_string(app_dir, s[8:]); + return s.replace("\\'","'") return '' # Retrieve the package name @@ -890,9 +893,7 @@ def fetch_real_name(app_dir): if name.startswith('@string/'): return retrieve_string(app_dir, name[8:]) - - else: - return name + return name # Extract some information from the AndroidManifest.xml at the given path. # Returns (version, vercode, package), any or all of which might be None.