def wash_for_js(text):
from invenio_utils.html import escape_javascript_string<EOL>if isinstance(text, six.string_types):<EOL><INDENT>return '<STR_LIT>' % escape_javascript_string(<EOL>text,<EOL>escape_for_html=False,<EOL>escape_CDATA=False,<EOL>escape_script_tag_with_quote=None)<EOL><DEDENT>else:<EOL><INDENT>return text<EOL><DEDENT>
DEPRECATED: use htmlutils.escape_javascript_string() instead,
and take note that returned value is no longer enclosed into
quotes.