mothra: fix content handling, run uhtml only on actual html content

front
cinap_lenrek 2011-09-26 16:24:47 +02:00
parent 22f094452e
commit 80f5df89b2
1 changed files with 3 additions and 3 deletions

View File

@ -932,14 +932,14 @@ void geturl(char *urlname, int method, char *body, int cache, int map){
fd=pipeline("/bin/uncompress", fd); fd=pipeline("/bin/uncompress", fd);
else if(selection->type&GUNZIP) else if(selection->type&GUNZIP)
fd=pipeline("/bin/gunzip", fd); fd=pipeline("/bin/gunzip", fd);
snprint(cmd, sizeof(cmd), selection->charset[0] ?
"/bin/uhtml -c %s" : "/bin/uhtml", selection->charset);
fd = pipeline(cmd, fd);
switch(selection->type&~COMPRESSION){ switch(selection->type&~COMPRESSION){
default: default:
message("Bad type %x in geturl", selection->type); message("Bad type %x in geturl", selection->type);
break; break;
case HTML: case HTML:
snprint(cmd, sizeof(cmd), selection->charset[0] ?
"/bin/uhtml -c %s" : "/bin/uhtml", selection->charset);
fd = pipeline(cmd, fd);
case PLAIN: case PLAIN:
w = www(i = wwwtop++); w = www(i = wwwtop++);
if(i >= NWWW){ if(i >= NWWW){