mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
no textdb proliferation necessary
This commit is contained in:
parent
c2aa52adfa
commit
b9ac38a361
4 changed files with 32 additions and 19 deletions
|
@ -4,15 +4,16 @@
|
|||
|
||||
// html-escaping of generic strings -lynx
|
||||
// to make sure they won't trigger
|
||||
// html commands
|
||||
// html commands. this should become an inline macro, maybe use
|
||||
// regreplace if that is faster, or even better, be implemented in C
|
||||
// together with an auto hyperlink and a linebreak conversion option.
|
||||
//
|
||||
varargs string htquote(string s, int newlines) {
|
||||
varargs string htquote(string s) {
|
||||
ASSERT("htquote", stringp(s), s)
|
||||
s = replace(s, "&", "&");
|
||||
// s = replace(s, "\"", """); //"
|
||||
s = replace(s, "<", "<");
|
||||
s = replace(s, ">", ">");
|
||||
if (newlines) s = replace(s, "\n", "<br>\n");
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue