[Top] [Prev] [Next] [Bottom]
[Contents]
SaMakeHtmlString
Makes an HTML-compatible string from its argument.
#include "SaRnHtml.h"
char* SaMakeHtmlString(char* str);
Arguments
- str
- The string to convert.
Return Values
Returns an HTML-compatible string from its argument. Returns an empty string if the input is NULL.
Returns an HTML-compatible string from its argument. Returns an empty string if the input is NULL. When you send back HTML from a server application, you must escape certain characters so that the browser does not interpret them as special HTML characters. The browser will then "unescape" the string and the original characters will appear to the user. The following translations are done:
- < becomes "<"
- > becomes ">"
- & becomes "&"
- " becomes """
The returned string is malloc'd data and must be free'd. Use this function when writing out data to return from a server application.
char* htmlStr;
htmlStr = SaMakeHtmlString("<>");
/*** htmlStr contains: <> ****/
free(htmlStr);
See Also
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.