diff app/views/pastes/show.html.erb @ 418:a69dd2d37950

Prevent adding unrelated classes and funny characters
author nanaya <me@myconan.net>
date Thu, 17 Sep 2015 01:13:14 +0900
parents 080dd141898c
children bec47da9052a
line wrap: on
line diff
--- a/app/views/pastes/show.html.erb	Mon Sep 14 14:50:35 2015 +0900
+++ b/app/views/pastes/show.html.erb	Thu Sep 17 01:13:14 2015 +0900
@@ -26,7 +26,7 @@
     </div>
 
     <div role="tabpanel" class="tab-pane" id="hl">
-      <pre class="paste-show__content"><code class="js-paste-hl zp-hl lang-<%= @paste.language %>"></code></pre>
+      <pre class="paste-show__content"><code class="js-paste-hl zp-hl lang-<%= @paste.language.parameterize %>"></code></pre>
     </div>
 
     <div role="tabpanel" class="tab-pane" id="md">