fix!(markdown): prevent html injection
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
2 files changed
+20
-21
No files matched your search
@@ -9,7 +9,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<%= if @extension == "md" do%>
|
||||
<div class="break-word px-6 py-4 h-full w-full markdown overflow-y-auto"><%= raw Earmark.as_html!(@paste.content, escape: false, gfm_tables: true) %></div>
|
||||
<div class="break-word px-6 py-4 h-full w-full markdown overflow-y-auto"><%= raw Earmark.as_html!(@paste.content, escape: true, gfm_tables: true) %></div>
|
||||
<% else %>
|
||||
<code class="break-word px-6 py-4 h-full w-full overflow-y-auto"><%= raw Ketbin.Utils.Syntax.highlight_text(@paste.content, @extension) |> HtmlSanitizeEx.html5 %></code>
|
||||
<% end %>
|
||||
|
||||
Reference in new issue
Block a user