garretus / phpquery

Automatically exported from code.google.com/p/phpquery
0 stars 0 forks source link

Implementation of DOMDocumentWrapper->isXHTML() #167

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Load a HTML compatible XHTML document (== XHTML markup, text/html Content 
Type)
2. Call isXHTML()

Expected output is true. Getting false. Using version 0.9.5-386. 

I think the implementation is wrong:

// XXX ok ?
return strpos($markup, "<!DOCTYPE html") !== false;

It should be:

return stripos($markup, "<!DOCTYPE xhtml") !== false;

Or am I missing something?

Original issue reported on code.google.com by lawre...@tinkercode.com on 12 Jan 2011 at 11:14