1
0
Fork 0
forked from wezm/wezm.net

HTML escape titles and excerpts

This commit is contained in:
Wesley Moore 2010-07-23 13:21:05 +10:00
parent 1d84e0e583
commit a663455cf6
5 changed files with 6 additions and 5 deletions

View file

@ -6,7 +6,7 @@
<span class="year"><%= post_date.year %></span>
</abbr>
<p>
<strong><a href="<%= @article.reps.first.path %>"><%= @article[:title] %></a></strong>
<%= @article[:extra] %>
<strong><a href="<%= @article.reps.first.path %>"><%=h @article[:title] %></a></strong>
<%=h @article[:extra] %>
</p>
</li>

View file

@ -1,6 +1,6 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title><%= [@item[:title], 'WezM.net'].compact.join(' ') %></title>
<title><%=h [@item[:title], 'WezM.net'].compact.join(' - ') %></title>
<!--[if lt IE 9]>
<script src="/js/html5.js"></script>
<![endif]-->

View file

@ -6,7 +6,7 @@
<body class="articles">
<%= render '_header' %>
<div id="content">
<h1>Archives</h1>
<h1><%= h(@item[:title] || 'Articles') %></h1>
<%
menu = [

View file

@ -6,7 +6,7 @@
<body<%= %Q( class="#{@item[:body_class]}") if @item[:body_class] %>>
<%= render '_header' %>
<div id="content">
<h1><a href="<%= @item.reps.first.path %>"><%= @item[:title] %></a></h1>
<h1><a href="<%= @item.reps.first.path %>"><%=h @item[:title] %></a></h1>
<%= yield %>
</div>
<%= render '_footer' %>

View file

@ -6,4 +6,5 @@ require 'json'
include Nanoc3::Helpers::Rendering
include Nanoc3::Helpers::Blogging
include Nanoc3::Helpers::XMLSitemap
include Nanoc3::Helpers::HTMLEscape
include WezM::Helpers::Articles