Be more flexible in identifying HTML files

Some tests in WebKit have no <html> and no <head>...
* Allow "<style", "<script", and "<a href" to identify HTML
* Scan up to 256 characters instead of 64
* Also remove the rule identifying "<!--", because this really isn't html
specific.
This commit is contained in:
Adrien Destugues 2014-04-16 08:45:09 +02:00
parent 607a620b1c
commit 34828f7346
1 changed files with 3 additions and 3 deletions

View File

@ -4,9 +4,9 @@ resource(0, "BEOS:TYPE") #'MIMS' "application/x-vnd.Be-meta-mime";
resource(1, "META:TYPE") "text/html";
resource(2, "META:SNIFF_RULE") #'CSTR' array {
"0.40 [0:64]( -i \"<HTML\" | \"<HEAD\" | \"<TITLE\" | \""
"<BODY\" | \"<TABLE\" | \"<!--\" | \"<META\" | \"<CENTER\" | \""
"<!DOCTYPE HTML\")"
"0.40 [0:256]( -i \"<HTML\" | \"<HEAD\" | \"<TITLE\" | \"<BODY\" | "
"\"<TABLE\" | \"<META\" | \"<CENTER\" | \"<!DOCTYPE HTML\" | \"<SCRIPT\" | "
"\"<STYLE\" | \"<A HREF\" )"
};
resource(3, "META:S:DESC") #'MSDC' "HTML file";