• About TV's server
  • New in version 3.20
  • New in version 3.10
  • About the source code
  • About protocols/plugins
  • TV's server API
  • Protocol Initialisation
  • Protocol binding
  • Protocol Listening and handling
  • Protocol data storage
  • Control panel
  • Multi column list
  • Time and date
  • Http protocol functions
  • Unimplemented and/or replaced functions
  • EscapeHtmlAndSendValue function

    The EscapeHtmlAndSendValue function will escape special ANSI HTML-characters and send ,possibly in chunks, the converted string to the client.

    Syntax

    int __stdcall EscapeHtmlAndSendValue(
    __in ProtocolSession *psess,
    __in ClientSession *sess,
    __in char *inputString,
    __in int timeout,
    __in int flags
    );

    Parameters

    psess [in]sess [in]inputString [in]timeout [in]flags [in]
    ValueMeaning
    REPLACE_SPACE_WITH_NON_BREAKING_SPACE
    0x1
    The space should be replaced by   (non-breaking space). If this flag is not set, the space will be send unchanged.
    EHSV_SEND_IN_CHUNKS
    0x2
    The outcomming data will be send in chunks.
    EHSV_DONT_ESCAPE_ANSI
    0x4
    ANSI characters will not be escaped. This means that only " & ' < > ` will be escaped.

    Return value

    This can be one of the following values:

    ValueMeaning
    CE_NOERR
    0
    No error.
    CE_NO_BUFFER_AVAILABLE
    1
    There is not enough free space available in the internal buffer.
    CE_CONNECTION_CLOSED
    2
    Cannot complete the request because the connection with the client has been closed.
    CE_UNKNOWN_ERROR
    3
    An error occurred and since the RSF_RETURN_ON_ERROR flag is set the function returns.
    CE_TIMEOUT
    4
    A timeout has occurred.

    Remarks

    The following characters will be replaced by this their respective HTML Entity:
    " & ' < > ` € ‘ ’ “ ” – — ™ ¡ ¢ £ ¥ § © « ® &`deg; ± ´ µ ¶ · » ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü ß à á â ã ä å æ ç è é ê ë ì í î ï ñ ò ó ô õ ö ÷ ø ù ú û ü ÿ
    If flag REPLACE_SPACE_WITH_NON_BREAKING_SPACE is set, the space will be also be replaced by the non-breaking space.

    Requirements

    Should be exported by -
    Minimum supported API 1.00
    Header tvsserver_base.h
    Library(x86) tvs_server_http_protocol_x86.lib
    Library(x64) tvs_server_http_protocol_x64.lib
    DLL(x86) tvs_server_http_protocol_x86.DLL
    DLL(x64) tvs_server_http_protocol_x64.DLL