Commit fa86eef9 by James Cammarata

Make sure value in regex_replace is a string

Fixes #7551
parent e85c7f84
......@@ -132,6 +132,10 @@ def search(value, pattern='', ignorecase=False):
def regex_replace(value='', pattern='', replacement='', ignorecase=False):
''' Perform a `re.sub` returning a string '''
if not isinstance(value, basestring):
value = str(value)
if ignorecase:
flags = re.I
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment