'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
'html' => 'text/html', // application/xhtml+xml?
+ 'http://www.opengis.net/kml/2.1:kml' => 'application/vnd.google-earth.kml+xml',
+ 'http://www.opengis.net/kml/2.2:kml' => 'application/vnd.google-earth.kml+xml',
+ 'kml' => 'application/vnd.google-earth.kml+xml',
);
/**
define( 'MEDIATYPE_TEXT', 'TEXT' ); // Plain text (possibly containing program code or scripts)
define( 'MEDIATYPE_EXECUTABLE', 'EXECUTABLE' ); // binary executable
define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' ); // archive file (zip, tar, etc)
+define( 'MEDIATYPE_DATA', 'DATA' ); // A generic data file (like kml and kmz)
/**@}*/
/**@{
application/vnd.ms-excel.template.macroEnabled.12 [OFFICE]
application/vnd.ms-excel.addin.macroEnabled.12 [OFFICE]
application/vnd.ms-excel.sheet.binary.macroEnabled.12 [OFFICE]
-
application/acad application/x-acad application/autocad_dwg image/x-dwg application/dwg application/x-dwg application/x-autocad image/vnd.dwg drawing/dwg [DRAWING]
-
+application/vnd.google-earth.kml+xml [DATA]
+application/vnd.google-earth.kmz [DATA]
model/vnd.dwfx+xps dwfx
application/vnd.ms-xpsdocument xps
application/x-opc+zip docx dotx docm dotm potx ppsx pptx ppam pptm potm ppsm xlsx xltx xlsm xltm xlam xlsb dwfx xps
+application/vnd.google-earth.kml+xml kml
+application/vnd.google-earth.kmz kmz
foreach( $tags as $tag ) {
if( false !== strpos( $chunk, $tag ) ) {
+ wfDebug( __METHOD__ . ": found something that may make it be mistaken for html: $tag\n" );
return true;
}
}
# look for script-types
if( preg_match( '!type\s*=\s*[\'"]?\s*(?:\w*/)?(?:ecma|java)!sim', $chunk ) ) {
+ wfDebug( __METHOD__ . ": found script types\n" );
return true;
}
# look for html-style script-urls
if( preg_match( '!(?:href|src|data)\s*=\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
+ wfDebug( __METHOD__ . ": found html-style script urls\n" );
return true;
}
# look for css-style script-urls
if( preg_match( '!url\s*\(\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
+ wfDebug( __METHOD__ . ": found css-style script urls\n" );
return true;
}