Upgrade from smarty 2 to 3 Unexpected "|"

362 views Asked by At

I am sorting out issues in a smarty upgrade from 2 to 3 and I am getting this error and I can't figure out why:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template {$item.content_group_name | htmlspecialchars} - Unexpected "|"

Anyone have any experience with this issue?

1

There are 1 answers

3
Rob Ruchte On BEST ANSWER

Smarty 3 fails with that error if there is white space around the | character when declaring a modifier. Change your tag to

{$item.content_group_name|htmlspecialchars}