mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-14 14:31:02 +00:00
21 lines
508 B
C
21 lines
508 B
C
|
// $Id: htbasics.c,v 1.5 2007/06/28 20:17:50 lynx Exp $ // vim:syntax=lpc
|
||
|
#include <net.h>
|
||
|
#include <ht/http.h>
|
||
|
|
||
|
// html-escaping of generic strings -lynx
|
||
|
// to make sure they won't trigger
|
||
|
// html commands
|
||
|
//
|
||
|
string htquote(string s) {
|
||
|
ASSERT("htquote", stringp(s), s)
|
||
|
s = replace(s, "&", "&");
|
||
|
// s = replace(s, "\"", """); //"
|
||
|
s = replace(s, "<", "<");
|
||
|
s = replace(s, ">", ">");
|
||
|
return s;
|
||
|
}
|
||
|
|
||
|
#ifdef HTTP_PATH
|
||
|
# include HTTP_PATH "library.i"
|
||
|
#endif
|