Remove backslash escaping from line.value.
421931
def decode(cls, line):
        """"""
        if line.encoded:
            encoding = getattr(line, 'encoding_param', None)
            if encoding and encoding.upper() == cls.base64string:
                line.value = b64decode(line.value)
            else:
                line.value = stringToTextValues(line.value)[0]
            line.encoded = False
800798
def _unescape(self, value):
    '''
    
    '''
    if isinstance(value, (str,unicode)):
      return value.replace(self._escape_character, '.')
    elif isinstance(value, dict):
      return { self._unescape(k) : self._unescape(v) for k,v in value.items() }
    elif isinstance(value, list):
      return [ self._unescape(v) for v in value ]
    return value
993880
def unicode_escape_sequence_fix(self, value):
        

        def fix_fn(match):
            # we don't escape an escaped backslash
            if match.group(0) == r"\\":
                return r"\\"
            return match.group(0).encode("utf-8").decode("unicode-escape")

        return re.sub(r"\\\\|\\u\w{4}|\\U\w{8}|\\N\{([^}\\]|\\.)+\}", fix_fn, value)
633125
String escapeValue(String value) {
        int start = 0;
        int pos = getNextLocation(start, value);
        if (pos == -1) {
            return value;
        }
        StringBuilder builder = new StringBuilder();
        while (pos != -1) {
            builder.append(value, start, pos);
            builder.append('\\');
            builder.append(value.charAt(pos));
            start = pos + 1;
            pos = getNextLocation(start, value);
        }
        builder.append(value, start, value.length());
        return builder.toString();
    }
227576
def _escape(self, value):
        """"""
        if isinstance(value, SafeString):
            return value

        return shellescape.quote(value)
125818
def fix_whitespace(line, offset, replacement):
    """"""
    # Replace escaped newlines too
    left = line[:offset].rstrip('\n\r \t\\')
    right = line[offset:].lstrip('\n\r \t\\')
    if right.startswith('#'):
        return line
    else:
        return left + replacement + right
1303672
def strip_ansi_escape_codes(self, string_buffer):
        """"""
        output = re.sub(r"\x00", "", string_buffer)
        return super(DellIsilonSSH, self).strip_ansi_escape_codes(output)
5822
private void escape(String value) {
        int n = value.length();
        int i = 0;
        for (int j = 0; j < n; ++j) {
            int k = ESCAPED_CHARS.indexOf(value.charAt(j));
            if (k >= 0) {
                if (i < j) {
                    append(value, i, j);
                }
                append(ESCAPE_SEQ[k]);
                i = j + 1;
            }
        }
        if (i < n) {
            append(value, i, n);
        }
    }
186847
public static String escapeEscapes(String value)
    {
        assert(value != null);
        InternalStringBuilder sb = new InternalStringBuilder(value.length());
        for (int i = 0; i < value.length(); i++) {
            char c = value.charAt(i);
            if (c == '"') {
                sb.append("&quot;");
                continue;
            }
            if (c == '\\') {
                sb.append("\\\\");
                continue;
            }
            sb.append(c);
        }
        return sb.toString();
    }
560084
def _indent(s, indent='  '):
    """"""
    if isinstance(s, six.string_types):
        return '\n'.join(('%s%s' % (indent, line) for line in s.splitlines()))
    return s
391504
private static String removeSlashes(String path) {
        String retString = path;
        String slash = System.getProperty("file.separator");

        //if non-Unix slashes replace
        retString = retString.replace(slash, "/");

        retString = retString.replaceFirst("^/", "");
        retString = retString.replaceFirst("/$", "");

        return retString;
    }
890747
def _unescape(v):
    """"""
    i = 0
    backslash = False
    while i < len(v):
        if backslash:
            backslash = False
            if v[i] in _escapes:
                v = v[:i - 1] + _escape_to_escapedchars[v[i]] + v[i + 1:]
            elif v[i] == '\\':
                v = v[:i - 1] + v[i:]
            elif v[i] == 'u' or v[i] == 'U':
                i += 1
            else:
                raise TomlDecodeError("Reserved escape sequence used")
            continue
        elif v[i] == '\\':
            backslash = True
        i += 1
    return v
675968
def escape_latex_str_if_str(value):
    ''''''
    if not isinstance(value, str):
        return value
    for regex, replace_text in REGEX_ESCAPE_CHARS:
        value = re.sub(regex, replace_text, value)
    value = re.sub(REGEX_BACKSLASH, r'\\\\', value)
    return value
502667
private void escapeValueTo(final String field, final StringBuilder target) {
        if (field == null) {
            target.append(DETAILS_QUOTE_CHAR);
            target.append(DETAILS_QUOTE_CHAR);
            return;
        }
        target.append(DETAILS_QUOTE_CHAR);
        if (field.indexOf(DETAILS_ESCAPE_CHAR) == -1 && field.indexOf(DETAILS_QUOTE_CHAR) == -1) {
            target.append(field);
        } else {
            final int len = field.length();
            for (int i = 0; i < len; i++) {
                final char charAt = field.charAt(i);
                if (charAt == DETAILS_ESCAPE_CHAR || charAt == DETAILS_QUOTE_CHAR) {
                    target.append(DETAILS_ESCAPE_CHAR);
                }
                target.append(charAt);
            }
        }
        target.append(DETAILS_QUOTE_CHAR);
    }
882583
protected static String unescape(String value) {

        value = CmsStringUtil.substitute(value, "\\,", ",");
        value = CmsStringUtil.substitute(value, "\\=", "=");
        value = CmsStringUtil.substitute(value, "\\\\", "\\");

        return value;
    }
573272
public static String unescape (String value)
    {
        int bsidx = value.indexOf('\\');
        if (bsidx == -1) {
            return value;
        }

        StringBuilder buf = new StringBuilder();
        int vlength = value.length();
        for (int ii = 0; ii < vlength; ii++) {
            char ch = value.charAt(ii);
            if (ch != '\\' || ii == vlength-1) {
                buf.append(ch);
            } else {
                // look at the next character
                ch = value.charAt(++ii);
                buf.append((ch == '!') ? '|' : ch);
            }
        }

        return buf.toString();
    }
1264691
function escape(value) {
  return value
    .split('')
    .map(function(character) {
      return '\\u' + character.charCodeAt(0).toString(16)
    })
    .join('')
}