The operator ? is a soft == instead of ?? which checks for hard empty.
Solution:
Check for 0 or use "??", but this would similar to #882
Alterantive Solution:
Check if the string even contains a "<" and then just return it, if not, then you save the whole regex.
Additional: The documenation on the true/false parameter is very unclear https://www.smarty.net/docs/en/language.modifier.strip.tags.tpl as it is hard to visualize the space when a linebreak is in the documentation, adding a sentence explaining the space or no space paradigma would help a lot.
Reproduction:
Expected:
0
Result: Empty stringThe Problem was introduced in https://github.com/smarty-php/smarty/blob/master/libs/plugins/modifiercompiler.strip_tags.php when a deprecation error was fixed here https://github.com/smarty-php/smarty/commit/612bd3f657875c9a425efebcab22856e4927c5ba
The operator ? is a soft == instead of ?? which checks for hard empty.
Solution: Check for 0 or use "??", but this would similar to #882
Alterantive Solution: Check if the string even contains a "<" and then just return it, if not, then you save the whole regex.
Additional: The documenation on the true/false parameter is very unclear https://www.smarty.net/docs/en/language.modifier.strip.tags.tpl as it is hard to visualize the space when a linebreak is in the documentation, adding a sentence explaining the space or no space paradigma would help a lot.