'Escape characters which may be used for command injection.
Parameters
value : str
A string of which characters will be escaped.
Returns
str
`value` with certain characters escaped.
Notes
The following characters are escaped::'

@classmethod
def escapeTag(cls, value):

    _map2c = {'\n': 'n', '\r': 'r'}
    def substChar(m):
        c = m.group()
        return ('\\' + _map2c.get(c, c))
    value = cls.ESCAPE_CRE.sub(substChar, value)
    return value
