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/res/values/all_search_engines.xml b/res/values/all_search_engines.xml
index 08cf763..c8880c4 100644
--- a/res/values/all_search_engines.xml
+++ b/res/values/all_search_engines.xml
@@ -157,7 +157,7 @@
     <item></item>
   </string-array>
   <string-array name="ask_es" translatable="false">
-    <item>Ask.com Espa&#x00f1a;</item>
+    <item>Ask.com Espa&#x00f1;a</item>
     <item>es.ask.com</item>
     <item>http://es.ask.com/favicon.ico</item>
     <item>http://es.ask.com/web?q={searchTerms}</item>
@@ -357,7 +357,7 @@
     <item>http://api.bing.com/osjson.aspx?query={searchTerms}&amp;language={language}</item>
   </string-array>
   <string-array name="yahoo_es" translatable="false">
-    <item>Yahoo! Espa&#x00f1a;</item>
+    <item>Yahoo! Espa&#x00f1;a</item>
     <item>es.yahoo.com</item>
     <item>http://es.search.yahoo.com/favicon.ico</item>
     <item>http://es.search.yahoo.com/search?ei={inputEncoding}&amp;fr=crmas&amp;p={searchTerms}</item>
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('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
     str = str.replace('"', '&quot;').replace('\'', '&apos;')
-    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