Mercurial > SimpleWebPresenter
changeset 105:b6381903122e
Prevent entity encoding of javascript
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Mon, 07 Mar 2016 17:11:43 +0100 |
| parents | a5c37e845d7c |
| children | d0698ec07b0b |
| files | InputParser.inc |
| diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/InputParser.inc Mon Mar 07 17:07:28 2016 +0100 +++ b/InputParser.inc Mon Mar 07 17:11:43 2016 +0100 @@ -77,7 +77,9 @@ */ function generateContent() { - $retVal = new PageContent($this->master->saveXml($this->master)); + //We may need to set and check the contenttype and replace + //saveHTML with saveXML + $retVal = new PageContent($this->master->saveHTML($this->master)); $retVal->setHeader('Content-Language', $this->options->getLang()); return $retVal; } @@ -90,7 +92,7 @@ * @return if the type is array, return an array, otherwise return a * scalar */ - function getParam($param) + static function getParam($param) { $param_type = $param->getAttribute("type"); $param_value; @@ -254,6 +256,7 @@ $clonedChild = $doc->importNode($child, true); $parent->insertBefore($clonedChild, $file); } + //We need to iterate in the opposite direction when removing, //so best shifting. array_unshift($toRemove, $file); @@ -312,7 +315,7 @@ $parent = $include->parentNode; $xml = getElementByTagName($subdoc,"xml"); foreach($xml->childNodes as $child) { - $text = $subdoc->saveXml($child); + $text = $subdoc->saveHTML($child); $clonedChild = $doc->importNode($child,true); $parent->insertBefore($clonedChild,$include); }
