code: def _escapeText(text):
  	
  	output = ""
  	index = 0
  	match = reCharsToEscape.search(text, index)
  	while match:
  		output = output + text[index:match.start()] + '\\' + text[match.start()]
  		index = match.end()
  		match = reCharsToEscape.search(text, index)
  	output = output + text[index:]
  	return output
docs: Adds backslash-escapes to property value characters that need them.