Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New feature #13732: Twig - add "striptags" allowed filters
- Loading branch information
LouisGac
committed
Jun 4, 2018
1 parent
c602558
commit fc48346
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fc48346
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function here, for filters it's striptags, no ?
I never know if it's best to use filter or function :((((((
fc48346
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filter is a function with only one parameter
strip_tags(var);
{{ var | striptags }}
it's pretty the same indeed. But I could add the striptags filters, since it's Twig native.
I didn't notice it.
fc48346
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i don't know what it's best … filter or function. Since i use more PHP : i use more function. Maybe «html dev» (intégrateur html in french) use more filter