mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
fix charset detection in CHM
This commit is contained in:
@@ -61,7 +61,7 @@ function convertCharset($buf)
|
||||
// Returns the name of character set in the given document
|
||||
function detectDocumentCharset($doc)
|
||||
{
|
||||
if (preg_match("/<META\\s+HTTP-EQUIV=\"CONTENT-TYPE\"\\s+CONTENT=\"TEXT\\/HTML;\\s+CHARSET=([\\w\\d-]*)\"\\s*>/iU", $doc, $reg)) {
|
||||
if (preg_match('/<META[^>]+CHARSET=["\'\s]?([\w\d-]+)["\'\s]?\s*>/iS', $doc, $reg)) {
|
||||
return $reg[1];
|
||||
}
|
||||
return false;
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<TABLE BORDER="0" WIDTH="100%" HEIGHT="100%" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR><TD COLSPAN="3"><DIV CLASS="NAVHEADER"><TABLE BGCOLOR="#CCCCFF" BORDER="0"
|
||||
CELLPADDING="0" CELLSPACING="0" WIDTH="100%"><TR><TD><TABLE WIDTH="100%" BORDER="0"
|
||||
CELLPADDING="3" CELLSPACING="0"><TR><TH COLSPAN="3">Smarty Manual</TH></TR><TR><TD
|
||||
CELLPADDING="3" CELLSPACING="0"><TR><TH COLSPAN="3">Manual do Smarty</TH></TR><TR><TD
|
||||
COLSPAN="3" ALIGN="center"> </TD></TR></TABLE></TD></TR><TR BGCOLOR="#333366">
|
||||
<TD><IMG SRC="spacer.gif" BORDER="0" WIDTH="1" HEIGHT="1"><BR></TD></TR></TABLE></DIV></TD></TR>
|
||||
<TR><TD><IMG SRC="spacer.gif" WIDTH="10" HEIGHT="1"></TD><TD HEIGHT="100%" VALIGN="MIDDLE" WIDTH="100%"><BR>
|
||||
|
Reference in New Issue
Block a user