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] A pointer to a ProtocolSession structure. This is a session assigned to a protocol at the moment it's loaded into the memory.
sess [in] A pointer to a ClientSession structure. This is a session assigned to a new connection. This connection has been created by a type PT_RECEIVER protocol.
inputString [in] A pointer to a null-terminated string containing an URL.
timeout [in] The time in miliseconds to wait for a client to respond to the receive operation. Set this parameter to zero for no timeout.
flags [in] This parameter can be zero or a combination of the following values.
Value | Meaning |
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:
Value | Meaning |
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
|