Skip to content

Commit

Permalink
BUG: stop double-escaping certain strings
Browse files Browse the repository at this point in the history
Oops, looks like I was a bit overzealous. :)
  • Loading branch information
Daniel Chokola committed Jul 7, 2007
1 parent b436a7d commit 93636da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion diff.rhtml
Expand Up @@ -17,7 +17,7 @@ w = Wit.new%>
</div>
<div class="info">
<table cellspacing="0" class="info"><%w.commit_info do |key, val|%>
<tr><td class="info"><%=key[:html]%>:</td><td class="info"><%=key[:plain] == 'commit message' ? val[:html].gsub("\n", '<br/>') : val[:html]%></td></tr><%end%>
<tr><td class="info"><%=key[:html]%>:</td><td class="info"><%=key[:plain] == 'commit message' ? val.gsub("\n", '<br/>') : val[:html]%></td></tr><%end%>
</table>
</div>
<div class="spacing"><%w.diff do |style, line|%>
Expand Down
3 changes: 1 addition & 2 deletions wit.rb
Expand Up @@ -104,7 +104,6 @@ def commits(num = nil, &block)
[commit[:title], commit[:description]].join("\n"),
commit[:hash]]

info = info.map { |c| CGI.escapeHTML(c || '') }
info.map! {|str| escape(str)}
info[0][:plain] = rawtime
info.insert(3, commit_substitutions(info[2][:html]))
Expand Down Expand Up @@ -203,7 +202,7 @@ def commit_info(&block)
info.push(['commit hash', cominfo[:hash]])

info.each do |(key, val)|
yield escape(key), escape(val)
yield escape(key), key == 'commit message' ? val : escape(val)
end
end

Expand Down

0 comments on commit 93636da

Please sign in to comment.