Function escapeUTF8

  • Encodes all characters not valid in XML documents using XML entities.

    Note that the output will be character-set dependent.

    Parameters

    • data: string

      String to escape.

    Returns string