Error in search engine script
The script that generates the search engine xml file
all_search_engines.xml contains an error when handling
unicodes.
The matching \\x([a-fA-F0-9]+) matches to many characters,
for example Espa\x00f1a will incorrectly become ༚ instead
of ña.
Make script match between 1 and 4 chars instead of 1 to many.
FIX=DMS01020910
Change-Id: I79a33b873e13698e17bd20da64152abcdd498bc0
diff --git a/tools/get_search_engines.py b/tools/get_search_engines.py
index cd73423..8ac9b6f 100755
--- a/tools/get_search_engines.py
+++ b/tools/get_search_engines.py
@@ -87,7 +87,7 @@
str = str.strip('"')
str = str.replace('&', '&').replace('<', '<').replace('>', '>')
str = str.replace('"', '"').replace('\'', ''')
- str = re.sub(r'\\x([a-fA-F0-9]+)', r'&#x\1;', str)
+ str = re.sub(r'\\x([a-fA-F0-9]{1,4})', r'&#x\1;', str)
return str