-rw-r--r-- | html.c | 20 |
1 files changed, 5 insertions, 15 deletions
@@ -50,5 +50,3 @@ void html_txt(char *txt) if (c=='<' || c=='>' || c=='&') { - *t = '\0'; - html(txt); - *t = c; + write(htmlfd, txt, t - txt); if (c=='>') @@ -73,5 +71,3 @@ void html_ntxt(int len, char *txt) if (c=='<' || c=='>' || c=='&') { - *t = '\0'; - html(txt); - *t = c; + write(htmlfd, txt, t - txt); if (c=='>') @@ -86,8 +82,4 @@ void html_ntxt(int len, char *txt) } - if (t!=txt) { - char c = *t; - *t = '\0'; - html(txt); - *t = c; - } + if (t!=txt) + write(htmlfd, txt, t - txt); if (len<0) @@ -102,5 +94,3 @@ void html_attr(char *txt) if (c=='<' || c=='>' || c=='\'') { - *t = '\0'; - html(txt); - *t = c; + write(htmlfd, txt, t - txt); if (c=='>') |