def _escape_for_yaml(body):
    """
    Performs YAML-compatible escaping on a string.

    :param str body: the string to escape
    """
    escaped_body = str(body).replace(u'\\', u'\\\\').replace(u'"', u'\\"')

    return u'"{0}"'.format(escaped_body)