summaryrefslogtreecommitdiffabout
path: root/html.c
Side-by-side diff
Diffstat (limited to 'html.c') (more/less context) (ignore whitespace changes)
-rw-r--r--html.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/html.c b/html.c
index 98ffaf9..937b5e7 100644
--- a/html.c
+++ b/html.c
@@ -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=='>')