[export] When exporting query result to excel it create's wrong HYPERLINK's for results with http (asnaik)
@@ -72,7 +72,7 @@ def encode_row(row, encoding=None, make_excel_links=False):
if isinstance(cell, six.string_types):
cell = re.sub(ILLEGAL_CHARS, '?', cell)
if make_excel_links:
- cell = re.compile('(https?://.+)', re.IGNORECASE).sub(r'=HYPERLINK("\1")', cell)
+ cell = re.compile('^(https?://.+)', re.IGNORECASE).sub(r'=HYPERLINK("\1")', cell)
cell = nullify(cell)
if not isinstance(cell, numbers.Number):
cell = smart_str(cell, encoding, strings_only=True, errors='replace')
