uhtml: dont trust charset=utf-8 attribute, verify.
when the charset is explicitely specified as utf-8, ignore it for now. we'll assume utf-8 when all bytes have been properly utf-8 encoded.
This commit is contained in:
parent
99e3bea407
commit
6974a1ecb6
|
@ -122,7 +122,8 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
t = *e;
|
t = *e;
|
||||||
*e = 0;
|
*e = 0;
|
||||||
if((a = attr(g, "encoding")) != nil || (a = attr(g, "charset")) != nil){
|
if((a = attr(g, "encoding")) != nil || (a = attr(g, "charset")) != nil)
|
||||||
|
if(cistrcmp(a, "utf") != 0 && cistrcmp(a, "utf-8") != 0){
|
||||||
cset = a;
|
cset = a;
|
||||||
*e = t;
|
*e = t;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue