aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pmwiki.php5
-rw-r--r--scripts/xlpage-utf-8.php4
2 files changed, 5 insertions, 4 deletions
diff --git a/pmwiki.php b/pmwiki.php
index afd69474..82706058 100644
--- a/pmwiki.php
+++ b/pmwiki.php
@@ -177,6 +177,7 @@ $PageTextVarPatterns = array(
$WikiTitle = 'PmWiki';
$Charset = 'ISO-8859-1';
+$HTMLHeaderFmt['Content-type'] = '';
$HTTPHeaders = array(
"Expires: Tue, 01 Jan 2002 00:00:00 GMT",
"Cache-Control: no-store, no-cache, must-revalidate",
@@ -1910,14 +1911,14 @@ function ProcessPrintFmt($pagename,$x) {
function PostPrintFmt($pagename,$fmt) {
global $EnablePrePrintFmt, $KeepToken, $HTTPHeaders, $FmtV;
if (is_array($fmt)) {
- foreach($fmt as $f) PostPrintFmt($pagename,$f);
+ foreach($fmt as $f) PostPrintFmt($pagename,$f);
return;
}
if ($fmt == 'headers:') {
foreach($HTTPHeaders as $h) (@$sent++) ? @header($h) : header($h);
return;
}
- $fmt = strval($fmt);
+ if (!is_string($fmt)) $fmt = strval($fmt);
$preprint = IsEnabled($EnablePrePrintFmt, 1);
if ($preprint && substr($fmt, 0, 4) == "$KeepToken$KeepToken") {
diff --git a/scripts/xlpage-utf-8.php b/scripts/xlpage-utf-8.php
index 34f9c1ae..a77a698b 100644
--- a/scripts/xlpage-utf-8.php
+++ b/scripts/xlpage-utf-8.php
@@ -24,8 +24,8 @@ global $HTTPHeaders, $KeepToken, $pagename,
$Charset, $HTMLHeaderFmt, $StrFoldFunction, $AsSpacedFunction;
$Charset = 'UTF-8';
-$HTTPHeaders['utf-8'] = 'Content-type: text/html; charset=UTF-8';
-$HTMLHeaderFmt['utf-8'] =
+$HTTPHeaders['Content-type'] = 'Content-type: text/html; charset=UTF-8';
+$HTMLHeaderFmt['Content-type'] =
"<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />";
SDVA($HTMLStylesFmt, array('rtl-ltr' => "
.rtl, .rtl * {direction:rtl; unicode-bidi:bidi-override;}