Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large template parsing error in smarty 3.1.33 #488

Closed
Visualq opened this issue Sep 13, 2018 · 1 comment
Closed

Large template parsing error in smarty 3.1.33 #488

Visualq opened this issue Sep 13, 2018 · 1 comment

Comments

@Visualq
Copy link
Contributor

Visualq commented Sep 13, 2018

Wrapping the svg template file in the attachment svg.tpl.txt with {literal}{/literal} throws the following exception:

Fatal Error
Unexpected input at line 1:
in file: /var/www/smarty/sysplugins/smarty_internal_templatelexer.php at line: 912

It appears that it has trouble handling the amount of content inside the {literal}{/literal}. Without the literal it throws a similar error:

Fatal Error
Unexpected input at line1:
in file: /var/www/smarty/sysplugins/smarty_internal_templatelexer.php at line: 368

It works fine if you remove a line or 2 or use a previous version of Smarty. (Note: I upgraded from 3.1.31 -> 3.1.33 so I haven't tested 3.1.32)

uwetews added a commit that referenced this issue Sep 18, 2018
…0kB could

    could fail in version 3.1.32 and 3.1.33 because PHP preg_match() restrictions
    #488
@uwetews
Copy link
Contributor

uwetews commented Sep 18, 2018

This fix is now in the master branch.

In 3.1.32 and 3.1.33 you could as workaround split the large plain text section somewhere in the middle with

... {/literal}{literal}...

@uwetews uwetews closed this as completed Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants