aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--data.html.erb9
-rw-r--r--tyrian.html.erb5
3 files changed, 10 insertions, 6 deletions
diff --git a/README.md b/README.md
index 3fe58de..63385e7 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,3 @@
# `tyrian` - Pluto Planet Template Pack
+
+Please note that Loofah is required for sanitization to use this pluto template.
diff --git a/data.html.erb b/data.html.erb
index 5967d20..ac87b78 100644
--- a/data.html.erb
+++ b/data.html.erb
@@ -1,3 +1,4 @@
+<% require 'loofah' %>
<html>
<body>
@@ -37,9 +38,9 @@
</div>
<div class="text-muted" style="height:63px;overflow-y: hidden;">
<% if item.content %>
- <%= textify(item.content) %>
+ <%= Loofah.fragment(item.content).scrub!(:prune).to_s %>
<% elsif item.summary %>
- <%= textify(item.summary) %>
+ <%= Loofah.fragment(item.content).scrub!(:prune).to_s %>
<% else %>
-/-
<% end %>
@@ -98,9 +99,9 @@
</div>
<% if item.content %>
- <%= textify(item.content) %>
+ <%= Loofah.fragment(item.content).scrub!(:prune).to_s %>
<% elsif item.summary %>
- <%= textify(item.summary) %>
+ <%= Loofah.fragment(item.summary).scrub!(:prune).to_s %>
<% else %>
-/-
<% end %>
diff --git a/tyrian.html.erb b/tyrian.html.erb
index 2882618..7b510a2 100644
--- a/tyrian.html.erb
+++ b/tyrian.html.erb
@@ -1,3 +1,4 @@
+<% require 'loofah' %>
<!DOCTYPE html>
<html>
<head>
@@ -216,9 +217,9 @@
</div>
<% if item.content %>
- <%= textify(item.content) %>
+ <%= Loofah.fragment(item.content).scrub!(:prune).to_s %>
<% elsif item.summary %>
- <%= textify(item.summary) %>
+ <%= Loofah.fragment(item.summary).scrub!(:prune).to_s %>
<% else %>
-/-
<% end %>