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
1 changed files with 2 additions and 1 deletions
|
@ -122,7 +122,8 @@ main(int argc, char *argv[])
|
|||
}
|
||||
t = *e;
|
||||
*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;
|
||||
*e = t;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue