Ticket #3766: sfBrowser.patch
| File sfBrowser.patch, 0.9 kB (added by francois, 7 months ago) |
|---|
-
lib/util/sfBrowser.class.php
old new 297 297 } 298 298 299 299 // for HTML/XML content, create a DOM and sfDomCssSelector objects for the response content 300 if (preg_match('/(x|ht)ml/i', $response->getContentType() ))300 if (preg_match('/(x|ht)ml/i', $response->getContentType(), $matches)) 301 301 { 302 302 $this->dom = new DomDocument('1.0', sfConfig::get('sf_charset')); 303 303 $this->dom->validateOnParse = true; 304 @$this->dom->loadHTML($response->getContent()); 304 if($matches[1] == 'x') 305 { 306 $this->dom->loadXML($response->getContent()); 307 } 308 else 309 { 310 $this->dom->loadHTML($response->getContent()); 311 } 305 312 $this->domCssSelector = new sfDomCssSelector($this->dom); 306 313 } 307 314 else