Mercurial > SimpleWebPresenter
comparison InputParser.inc @ 115:b9668126e52e
Remove comments.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Thu, 17 Mar 2016 22:32:33 +0100 |
| parents | d5f3efba33e2 |
| children | 374e3eff07fd |
comparison
equal
deleted
inserted
replaced
| 110:6f5939bf53c3 | 115:b9668126e52e |
|---|---|
| 61 } | 61 } |
| 62 $parent->removeChild($param); | 62 $parent->removeChild($param); |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 $this->master = self::getFiles($this->master, $this->options); | 65 $this->master = self::getFiles($this->master, $this->options); |
| 66 self::removeCommentsFromDOM($this->master); | |
| 66 $cache->setMaxAge(20); | 67 $cache->setMaxAge(20); |
| 68 } | |
| 69 | |
| 70 /** | |
| 71 * Removes all comments from the DOM | |
| 72 * | |
| 73 * @param $dom A DOMDocument for processing | |
| 74 */ | |
| 75 static function removeCommentsFromDOM($dom) | |
| 76 { | |
| 77 $xpath = new DOMXPath($dom); | |
| 78 foreach ($xpath->query('//comment()') as $comment) { | |
| 79 $comment->parentNode->removeChild($comment); | |
| 80 } | |
| 67 } | 81 } |
| 68 | 82 |
| 69 function cacheCheck() | 83 function cacheCheck() |
| 70 { | 84 { |
| 71 return $this->options->getCacheable(); | 85 return $this->options->getCacheable(); |
