Skip to content

Commit

Permalink
escape HTML @html_title.
Browse files Browse the repository at this point in the history
git-svn-id: https://tdiary.svn.sourceforge.net/svnroot/tdiary/trunk/core@1638 7f22e88f-374d-0410-998f-c91420d97ba2
  • Loading branch information
kazuhiko committed Oct 23, 2003
1 parent 8f71a72 commit b4155df
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 30 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
2003-10-23 Kazuhiko <kazuhiko@fdiary.net>
* plugin/ja/00default.rb, plugin/ja/00default.rb,
skel/category.rhtml, skel/conf.rhtml, skel/i.conf.rhtml,
skel/i.day.rhtml, skel/i.latest.rhtml, skel/i.month.rhtml,
skel/i.show.rhtml, skel/i.update.rhtml, skel/i.update.rhtml.en,
skel/preview.rhtml, skel/preview.rhtml.en, skel/show.rhtml,
skel/update.rhtml, skel/update.rhtml.en: escape HTML @html_title.

2003.10.22 TADA Tadashi <sho@spc.gr.jp>
* skel/tdiary.rconf: fix error when @author_mail was nil.

Expand Down
2 changes: 1 addition & 1 deletion plugin/en/00default.rb
Expand Up @@ -6,7 +6,7 @@
# header
#
def title_tag
r = "<title>#{@html_title}"
r = "<title>#{CGI::escapeHTML( @html_title )}"
case @mode
when 'day', 'comment'
r << "(#{@date.strftime( '%Y-%m-%d' )})" if @date
Expand Down
2 changes: 1 addition & 1 deletion plugin/ja/00default.rb
Expand Up @@ -6,7 +6,7 @@
# header
#
def title_tag
r = "<title>#{@html_title}"
r = "<title>#{CGI::escapeHTML( @html_title )}"
case @mode
when 'day', 'comment'
r << "(#{@date.strftime( '%Y-%m-%d' )})" if @date
Expand Down
4 changes: 2 additions & 2 deletions skel/category.rhtml
@@ -1,4 +1,4 @@
<%# category.rhtml $Revision: 1.4 $ %>
<%# category.rhtml $Revision: 1.5 $ %>
<%%=navi %>
<%
case mode
Expand All @@ -18,7 +18,7 @@ when /latest/
param = []
end
%>
<h1><%= @conf.html_title %> [<%%= category_title %>: <%%= <%= label %> %>]</h1>
<h1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%= category_title %>: <%%= <%= label %> %>]</h1>
<hr class="sep">
<%%= category_form %>
<hr class="sep">
Expand Down
4 changes: 2 additions & 2 deletions skel/conf.rhtml
@@ -1,7 +1,7 @@
<%# conf.rhtml $Revision: 1.19 $ %>
<%# conf.rhtml $Revision: 1.20 $ %>
<%%=navi%>

<h1><%= @conf.html_title %> [<%%=navi_preference%>]</h1>
<h1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%=navi_preference%>]</h1>

<div class="sidebar">
<ul style="margin-top: 5em;">
Expand Down
4 changes: 2 additions & 2 deletions skel/i.conf.rhtml
@@ -1,5 +1,5 @@
<%# i.conf.rhtml $Revision: 1.7 $ %>
<h1><%= @conf.html_title %> [<%%=navi_preference%>]</h1>
<%# i.conf.rhtml $Revision: 1.8 $ %>
<h1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%=navi_preference%>]</h1>
<P>
<%%= mobile_navi %>
</P>
Expand Down
4 changes: 2 additions & 2 deletions skel/i.day.rhtml
@@ -1,6 +1,6 @@
<%# i.day.rhtml $Revision: 1.13 $ %>
<%# i.day.rhtml $Revision: 1.14 $ %>
<%%update_proc if @mode == 'comment'%>
<H1><%= @conf.html_title %></H1>
<H1><%= CGI::escapeHTML( @conf.html_title ) %></H1>
<P>
<%%= mobile_navi %>
</P>
Expand Down
4 changes: 2 additions & 2 deletions skel/i.latest.rhtml
@@ -1,5 +1,5 @@
<%# i.latest.rhtml $Revision: 1.10 $ %>
<H1><%= @conf.html_title %></H1>
<%# i.latest.rhtml $Revision: 1.11 $ %>
<H1><%= CGI::escapeHTML( @conf.html_title ) %></H1>
<%
param = {
'prefix' => 'i.',
Expand Down
4 changes: 2 additions & 2 deletions skel/i.month.rhtml
@@ -1,5 +1,5 @@
<%# i.day.rhtml $Revision: 1.10 $ %>
<H1><%= @conf.html_title %></H1>
<%# i.day.rhtml $Revision: 1.11 $ %>
<H1><%= CGI::escapeHTML( @conf.html_title ) %></H1>
<%
diary = @diaries[@diaries.keys.sort[0]]
if diary then
Expand Down
4 changes: 2 additions & 2 deletions skel/i.show.rhtml
@@ -1,6 +1,6 @@
<%# i.show.rhtml $Revision: 1.8 $ %>
<%# i.show.rhtml $Revision: 1.9 $ %>
<%%update_proc%>
<H1><%= @conf.html_title %> <%%=label_update_complete%></H1>
<H1><%= CGI::escapeHTML( @conf.html_title ) %> <%%=label_update_complete%></H1>
<P>
<%%= mobile_navi %>
</P>
Expand Down
4 changes: 2 additions & 2 deletions skel/i.update.rhtml
@@ -1,5 +1,5 @@
<%# i.update.rhtml $Revision: 1.15 $ %>
<H1><%= @conf.html_title %> [<%%= submit_label %>]</H1>
<%# i.update.rhtml $Revision: 1.16 $ %>
<H1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%= submit_label %>]</H1>

<P>
<%%= mobile_navi %>
Expand Down
4 changes: 2 additions & 2 deletions skel/i.update.rhtml.en
@@ -1,5 +1,5 @@
<%# i.update.rhtml $Revision: 1.8 $ %>
<H1><%= @conf.html_title %> [<%%= submit_label %>]</H1>
<%# i.update.rhtml $Revision: 1.9 $ %>
<H1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%= submit_label %>]</H1>

<P>
<%%= mobile_navi %>
Expand Down
4 changes: 2 additions & 2 deletions skel/preview.rhtml
@@ -1,7 +1,7 @@
<%# preview.rhtml $Revision: 1.9 $ %>
<%# preview.rhtml $Revision: 1.10 $ %>
<%%=navi%>

<h1><%= @conf.html_title %> [<%%=preview_label%>]</h1>
<h1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%=preview_label%>]</h1>
<%
param = {
'date_format' => @conf.date_format,
Expand Down
4 changes: 2 additions & 2 deletions skel/preview.rhtml.en
@@ -1,7 +1,7 @@
<%# preview.rhtml.en $Revision: 1.8 $ %>
<%# preview.rhtml.en $Revision: 1.9 $ %>
<%%=navi%>

<h1><%= @conf.html_title %> [<%%=preview_label%>]</h1>
<h1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%=preview_label%>]</h1>
<%
param = {
'date_format' => @conf.date_format,
Expand Down
4 changes: 2 additions & 2 deletions skel/show.rhtml
@@ -1,7 +1,7 @@
<%# show.rhtml $Revision: 1.9 $ %>
<%# show.rhtml $Revision: 1.10 $ %>
<%%=navi%><%%update_proc%>

<h1><%= @conf.html_title %> <%%=label_update_complete%></h1>
<h1><%= CGI::escapeHTML( @conf.html_title ) %> <%%=label_update_complete%></h1>
<% unless @diary.visible? then %><p class="message"><%%=label_hidden_diary%></p><% end %>
<%
param = {
Expand Down
4 changes: 2 additions & 2 deletions skel/update.rhtml
@@ -1,7 +1,7 @@
<%# update.rhtml $Revision: 1.24 $ %>
<%# update.rhtml $Revision: 1.25 $ %>
<%%=navi%>

<h1><%= @conf.html_title %> [<%%= submit_label %>]</h1>
<h1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%= submit_label %>]</h1>

<div class="update day">
<div class="form">
Expand Down
4 changes: 2 additions & 2 deletions skel/update.rhtml.en
@@ -1,7 +1,7 @@
<%# update.rhtml $Revision: 1.9 $ %>
<%# update.rhtml $Revision: 1.10 $ %>
<%%=navi%>

<h1><%= @conf.html_title %> [<%%= submit_label %>]</h1>
<h1><%= CGI::escapeHTML( @conf.html_title ) %> [<%%= submit_label %>]</h1>

<div class="update day">
<div class="form">
Expand Down

0 comments on commit b4155df

Please sign in to comment.