Browse Source

allow markdown from whitelist only

main
ghost 12 months ago
parent
commit
3c6b1d6ab7
  1. 15
      templates/default/torrent/info.html.twig

15
templates/default/torrent/info.html.twig

@ -238,9 +238,8 @@
{{ 'Source' | trans }} {{ 'Source' | trans }}
</td> </td>
<td> <td>
{# disable markdown as unsafe for unfiltered content #} {# strip all tags then apply whitelist markdown filters to prevent ping from remote #}
{#{{ file.source | url_to_markdown | markdown_to_html }}#} {{ file.source | striptags | markdown_to_html | striptags | url_to_markdown | markdown_to_html }}
{{ file.source }}
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
@ -250,9 +249,8 @@
{{ 'Software' | trans }} {{ 'Software' | trans }}
</td> </td>
<td> <td>
{# disable markdown as unsafe for unfiltered content #} {# strip all tags then apply whitelist markdown filters to prevent ping from remote #}
{#{{ file.software | url_to_markdown | markdown_to_html }}#} {{ file.software | striptags | markdown_to_html | striptags | url_to_markdown | markdown_to_html }}
{{ file.software }}
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
@ -262,9 +260,8 @@
{{ 'Comment' | trans }} {{ 'Comment' | trans }}
</td> </td>
<td> <td>
{# disable markdown as unsafe for unfiltered content #} {# strip all tags then apply whitelist markdown filters to prevent ping from remote #}
{#{{ file.comment | url_to_markdown | markdown_to_html }}#} {{ file.comment | striptags | markdown_to_html | striptags | url_to_markdown | markdown_to_html }}
{{ file.comment }}
</td> </td>
</tr> </tr>
{% endif %} {% endif %}

Loading…
Cancel
Save