mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-06-02 05:52:14 +02:00
parent
7238cc264e
commit
d575814dd3
|
@ -52,6 +52,11 @@ In Twig, you can use the `markdown` filter:
|
||||||
{# Use default parser #}
|
{# Use default parser #}
|
||||||
{{ my_data|markdown }}
|
{{ my_data|markdown }}
|
||||||
|
|
||||||
|
{# If my_data is entered by a user, escape HTML tags before printing it #}
|
||||||
|
{{ my_data|escape|markdown }}
|
||||||
|
{# or strip HTML tags #}
|
||||||
|
{{ my_data|striptags|markdown }}
|
||||||
|
|
||||||
{# Or select specific parser #}
|
{# Or select specific parser #}
|
||||||
{{ my_data|markdown('parserName') }}
|
{{ my_data|markdown('parserName') }}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue