diff --git a/app/models/journal.rb b/app/models/journal.rb
index 1376d34..a979624 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -30,7 +30,7 @@ class Journal < ActiveRecord::Base
:project_key => "#{Issue.table_name}.project_id",
:date_column => "#{Issue.table_name}.created_on"
- acts_as_event :title => Proc.new {|o| "#{o.issue.tracker.name} ##{o.issue.id}: #{o.issue.subject}" + ((s = o.new_status) ? " (#{s})" : '') },
+ acts_as_event :title => Proc.new {|o| status = ((s = o.new_status) ? " (#{s})" : nil); "#{o.issue.tracker} ##{o.issue.id}#{status}: #{o.issue.subject}" },
:description => :notes,
:author => :user,
:type => Proc.new {|o| (s = o.new_status) && s.is_closed? ? 'issue-closed' : 'issue-edit' },
diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb
index c2d8be9..78283c6 100644
--- a/app/models/repository/cvs.rb
+++ b/app/models/repository/cvs.rb
@@ -76,7 +76,8 @@ class Repository::Cvs < Repository
unless revision_to
revision_to=scm.get_previous_revision(revision_from)
end
- diff=diff+scm.diff(change_from.path, revision_from, revision_to, type)
+ file_diff = scm.diff(change_from.path, revision_from, revision_to)
+ diff = diff + file_diff unless file_diff.nil?
end
end
return diff
diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml
index 0b9d315..62d542b 100644
--- a/app/views/layouts/base.rhtml
+++ b/app/views/layouts/base.rhtml
@@ -36,7 +36,7 @@
<%= render :partial => 'layouts/project_selector' if User.current.memberships.any? %>
-
<%= render_main_menu(@project) %>
diff --git a/app/views/repositories/_dir_list_content.rhtml b/app/views/repositories/_dir_list_content.rhtml
index 3564e52..c3bd56e 100644
--- a/app/views/repositories/_dir_list_content.rhtml
+++ b/app/views/repositories/_dir_list_content.rhtml
@@ -26,7 +26,7 @@ end %>
<%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> |
<%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %> |
<%=h(entry.lastrev.author.to_s.split('<').first) if entry.lastrev %> |
-<% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev %>
+<% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
<% end %>
diff --git a/app/views/repositories/changes.rhtml b/app/views/repositories/changes.rhtml
index 2d7462b..341c6cb 100644
--- a/app/views/repositories/changes.rhtml
+++ b/app/views/repositories/changes.rhtml
@@ -13,6 +13,7 @@
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
-<%= render :partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }%>
+<%= render(:partial => 'revisions',
+ :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
<% html_title(l(:label_change_plural)) -%>
diff --git a/lib/SVG/Graph/Graph.rb b/lib/SVG/Graph/Graph.rb
index 403a020..a5e1ea7 100644
--- a/lib/SVG/Graph/Graph.rb
+++ b/lib/SVG/Graph/Graph.rb
@@ -829,7 +829,7 @@ module SVG
@doc << DocType.new( %q{svg PUBLIC "-//W3C//DTD SVG 1.0//EN" } +
%q{"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"} )
if style_sheet && style_sheet != ''
- @doc << ProcessingInstruction.new( "xml-stylesheet",
+ @doc << Instruction.new( "xml-stylesheet",
%Q{href="#{style_sheet}" type="text/css"} )
end
@root = @doc.add_element( "svg", {
diff --git a/lib/redcloth.rb b/lib/redcloth.rb
index fb6a053..421e5bf 100644
--- a/lib/redcloth.rb
+++ b/lib/redcloth.rb
@@ -1131,7 +1131,7 @@ class RedCloth < String
end
end
- ALLOWED_TAGS = %w(redpre pre code)
+ ALLOWED_TAGS = %w(redpre pre code notextile)
def escape_html_tags(text)
text.gsub!(%r{<(\/?([!\w]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "<#{$1}#{'>' unless $3.blank?}" }
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index fbbe0b2..07cd917 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -223,7 +223,7 @@ height: 1%;
clear:left;
}
-html>body .tabular p {overflow:auto;}
+html>body .tabular p {overflow:hidden;}
.tabular label{
font-weight: bold;
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index a1a369c..8931032 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -151,6 +151,14 @@ class ApplicationHelperTest < HelperTestCase
to_test.each { |text, result| assert_equal result, textilizable(text) }
end
+ def test_allowed_html_tags
+ to_test = {
+ "
preformatted text
" => "
preformatted text
",
+ "
no *textile* formatting" => "no *textile* formatting",
+ }
+ to_test.each { |text, result| assert_equal result, textilizable(text) }
+ end
+
def test_wiki_links_in_tables
to_test = {"|Cell 11|Cell 12|Cell 13|\n|Cell 21|Cell 22||\n|Cell 31||Cell 33|" =>
'
Cell 11 | Cell 12 | Cell 13 |
' +