{% for word in words.split(',') %} {{ paragraph|safe }} {{ paragraph|replace(word.strip(), '' + word.strip() + '')|safe }} {% endfor %}