- bugfix large template text of some charsets could cause parsing errors (topic 24630)

This commit is contained in:
Uwe.Tews@googlemail.com
2014-06-17 20:24:20 +00:00
parent 0e1f7fdcfc
commit ee69f963c6
7 changed files with 707 additions and 618 deletions
@@ -98,6 +98,13 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
// start state on child templates
$this->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBODY);
}
if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) {
$mbEncoding = mb_internal_encoding();
mb_internal_encoding('ASCII');
} else {
$mbEncoding = null;
}
if ($this->smarty->_parserdebug) {
$this->parser->PrintTrace();
$this->lex->PrintTrace();
@@ -117,6 +124,9 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
}
// finish parsing process
$this->parser->doParse(0, 0);
if ($mbEncoding) {
mb_internal_encoding($mbEncoding);
}
// check for unclosed tags
if (count($this->_tag_stack) > 0) {
// get stacked info