From fbf05a159bc1a688940c16dc304eaaf140188b01 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 28 Jul 2006 07:56:03 +0000 Subject: Time-Tracker Demo: Escape html entities in output. --- demos/time-tracker/index.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'demos/time-tracker/index.php') diff --git a/demos/time-tracker/index.php b/demos/time-tracker/index.php index 0f8f412a..69e6b5c5 100644 --- a/demos/time-tracker/index.php +++ b/demos/time-tracker/index.php @@ -14,6 +14,13 @@ if(!is_writable($runtimePath)) require_once($frameworkPath); +function h($text) +{ + $app = Prado::getApplication()->getGlobalization(); + $charset = $app ? $app->getCharset() : 'UTF-8'; + return htmlentities($text, ENT_QUOTES, $charset); +} + $application=new TApplication; $application->run(); -- cgit v1.2.3