I want to truncate a string in Smarty
This is the scenario:
The string is "Test!abc". Maximum characters allowed = 5.
Smarty gets string.
If I use {$string}, I get the desired result "Test!abc"
If I use {$string|truncate:5:"..":true} I get "Test&.."
How can I make truncate after html chars conversion. Prefer not to make it in php.
I know about "replace", but it will look like "|replace..|replace..|......"
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)