]> git.mxchange.org Git - mailer.git/commitdiff
Possible fix for JavaScript templates, don't use escapeQuotes() for them
authorRoland Häder <roland@mxchange.org>
Fri, 6 Nov 2009 15:33:01 +0000 (15:33 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 6 Nov 2009 15:33:01 +0000 (15:33 +0000)
inc/functions.php

index 3a9033aedb6af0e7e6916cf210a12de948311ecd..7ef9f2e04176de185abf81c2402184cb2b619a99 100644 (file)
@@ -294,7 +294,7 @@ function loadTemplate ($template, $return = false, $content = array()) {
                                        $eval = '$ret = "' . compileCode(escapeQuotes($ret)) . '";';
                                } elseif (substr($template, 0, 3) == 'js_') {
                                        // JavaScripts don't like entities and timings
-                                       $eval = '$ret = decodeEntities("' . compileRawCode(escapeQuotes($GLOBALS['tpl_content'])) . '");';
+                                       $eval = '$ret = decodeEntities("' . compileRawCode(addslashes($GLOBALS['tpl_content'])) . '");';
                                } else {
                                        // Prepare eval() command
                                        $eval = '$ret = "' . compileCode(escapeQuotes($GLOBALS['tpl_content'])) . '";';