-rw-r--r-- | html.c | 20 |
1 files changed, 5 insertions, 15 deletions
@@ -58,5 +58,3 @@ void html_txt(char *txt) if (c=='<' || c=='>' || c=='&') { - *t = '\0'; - html(txt); - *t = c; + write(htmlfd, txt, t - txt); if (c=='>') @@ -81,5 +79,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=='>') @@ -94,8 +90,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) @@ -110,5 +102,3 @@ void html_attr(char *txt) if (c=='<' || c=='>' || c=='\'') { - *t = '\0'; - html(txt); - *t = c; + write(htmlfd, txt, t - txt); if (c=='>') |