diff options
author | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-12-10 09:48:47 +0300 |
---|---|---|
committer | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-12-10 09:48:47 +0300 |
commit | 35015ec2bcfcc0a208d74fe4b9d5536164419f0e (patch) | |
tree | a7e7737021ab6f51b58eacedd9166cfa8c170b34 | |
parent | 950ab9b7b5b10358ce67b20118f6508b7c61b1e3 (diff) |
fixes #1060 - escape " (double quotes); don't set json header when serving widget+data
-rw-r--r-- | core/ViewDataTable/GenerateGraphData.php | 5 | ||||
-rw-r--r-- | core/ViewDataTable/GenerateGraphHTML.php | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/core/ViewDataTable/GenerateGraphData.php b/core/ViewDataTable/GenerateGraphData.php index d3b1251f73..b4eca90a99 100644 --- a/core/ViewDataTable/GenerateGraphData.php +++ b/core/ViewDataTable/GenerateGraphData.php @@ -87,7 +87,10 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable } $this->mainAlreadyExecuted = true; - @header( "Content-type: application/json" ); + if (!Zend_Registry::get('config')->General->serve_widget_and_data) + { + @header( "Content-type: application/json" ); + } // the queued filters will be manually applied later. This is to ensure that filtering using search // will be done on the table before the labels are enhanced (see ReplaceColumnNames) diff --git a/core/ViewDataTable/GenerateGraphHTML.php b/core/ViewDataTable/GenerateGraphHTML.php index 1c3bad57f3..6403b5d82c 100644 --- a/core/ViewDataTable/GenerateGraphHTML.php +++ b/core/ViewDataTable/GenerateGraphHTML.php @@ -135,7 +135,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphHTML extends Piwik_ViewDataTable $_GET = $saveGet; - return str_replace(array("\r", "\n", "'"), array('', '', "\\'"), $content); + return str_replace(array("\r", "\n", "'", '\"'), array('', '', "\\'", '\\"'), $content); } protected function getFlashParameters() |