'Escape the given tag value according to U{escaping rules in IRCv3
<https://ircv3.net/specs/core/message-tags-3.2.html>}.
@param value: The string value to escape.
@type value: L{str}
@return: The escaped string for sending as a message value
@rtype: L{str}'

def _escapeTagValue(self, value):

    return value.replace('\\', '\\\\').replace(';', '\\:').replace('    ', '\\s').replace('\r', '\\r').replace('\n', '\\n')
