Changeset 9668
- Timestamp:
- 06/19/08 15:22:32 (4 months ago)
- Files:
-
- branches/1.0/lib/util/sfBrowser.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/util/sfBrowser.class.php
r6129 r9668 201 201 202 202 // for HTML/XML content, create a DOM and sfDomCssSelector objects for the response content 203 if (preg_match('/(x|ht)ml/i', $response->getContentType())) 203 $content = $response->getContentType(); 204 if (preg_match('/(x|ht)ml/i', $content, $matches)) 204 205 { 205 206 $this->dom = new DomDocument('1.0', sfConfig::get('sf_charset')); 206 207 $this->dom->validateOnParse = true; 207 @$this->dom->loadHTML($response->getContent()); 208 if ('x' == $matches[1]) 209 { 210 $this->dom->loadXML($content); 211 } 212 else 213 { 214 $this->dom->loadHTML($content); 215 } 208 216 $this->domCssSelector = new sfDomCssSelector($this->dom); 209 217 }