summaryrefslogtreecommitdiff
path: root/itjs.class
diff options
context:
space:
mode:
authorThomas BrĂ¼derli2008-01-15 09:25:24 +0000
committerThomas BrĂ¼derli2008-01-15 09:25:24 +0000
commitb3d9cb739b93ce5f877ad62e476713976236be53 (patch)
tree27b566e16c8925deace2160fe2d39b19670f9744 /itjs.class
parent5cfc141931bea8265e70a668b46a7da56e45c09e (diff)
downloaditools-b3d9cb739b93ce5f877ad62e476713976236be53.tar.gz
itools-b3d9cb739b93ce5f877ad62e476713976236be53.tar.bz2
itools-b3d9cb739b93ce5f877ad62e476713976236be53.zip
Support other charsets than ISO Latin
Diffstat (limited to 'itjs.class')
-rw-r--r--itjs.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/itjs.class b/itjs.class
index 73b2b5f..8482228 100644
--- a/itjs.class
+++ b/itjs.class
@@ -27,10 +27,10 @@ class itjs
/**
* Send HTTP headers (content-type) to transmit javascript code
*/
-function send_headers()
+function send_headers($charset = 'iso-8859-1')
{
if (!preg_match('/Opera/', $_SERVER['HTTP_USER_AGENT']) && !$_REQUEST['itjs_iframe']) # text/plain breaks Opera 8.51/Linux and IFrame fallback
- header('Content-Type: text/plain; charset=iso-8859-1'); # Berni reported some Firewalls to require this
+ header("Content-Type: text/plain; charset=$charset"); # Berni reported some Firewalls to require this
header('Expires: ' . gmdate('D, d M Y H:i:s', time()+10) . ' GMT'); # prevent broken data on IE reloads
}