From d575814dd37ca08926e36e7f445ad44bbfcf33da Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Wed, 15 Apr 2020 09:55:14 -0400 Subject: [PATCH] Adding note about avoiding XSS problems Closes #91 --- README.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.markdown b/README.markdown index 2c0a081..715d6ad 100644 --- a/README.markdown +++ b/README.markdown @@ -52,6 +52,11 @@ In Twig, you can use the `markdown` filter: {# Use default parser #} {{ 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 #} {{ my_data|markdown('parserName') }} ```