Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Changed appendXML with createElement for text translation to avoid html entity parsing errors https://github.com/givanz/Vvveb/issues/142

givanz7c83b9ee9fb7
diff --git a/system/vtpl/vtpl.php b/system/vtpl/vtpl.php
index 2a36435..8bf4452 100755
--- a/system/vtpl/vtpl.php
+++ b/system/vtpl/vtpl.php
@@ -1956,11 +1956,17 @@ class Vtpl {
$trimmed = addcslashes($trimmed, "'");
if (strlen($trimmed) < 1024) {
+ /*
$php = '<_script language="php"><![CDATA[ echo ' . $this->translationFunction . '(\'' . $trimmed . '\');]]></_script>';
//keep space around text for html spacing
$php = str_replace($trimmed, $php, $text);
$f = $this->document->createDocumentFragment();
$f->appendXML($php);
+ */
+ $c = $this->document->createCDATASection('echo ' . $this->translationFunction . '(\'' . $trimmed . '\');');
+ $f = $this->document->createElement('_script');
+ $f->setAttribute('language', 'php');
+ $f->append($c);
$node = $node->parentNode->replaceChild($f, $node);
}
//$node->parentNode->replaceChild($f, $node);