mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 21:35:46 +02:00
Merged r1399, r1403, r1405 and r1406 from trunk.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.7-stable@1407 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1134,7 +1134,7 @@ class RedCloth < String
|
||||
ALLOWED_TAGS = %w(redpre pre code)
|
||||
|
||||
def escape_html_tags(text)
|
||||
text.gsub!(%r{<(\/?(\w+)[^>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "<#{$1}#{'>' if $3}" }
|
||||
text.gsub!(%r{<(\/?([!\w]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "<#{$1}#{'>' unless $3.blank?}" }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ module Redmine
|
||||
content = @pre_list[$1.to_i]
|
||||
if content.match(/<code\s+class="(\w+)">\s?(.+)/m)
|
||||
content = "<code class=\"#{$1} CodeRay\">" +
|
||||
CodeRay.scan($2, $1).html(:escape => false, :line_numbers => :inline)
|
||||
CodeRay.scan($2, $1.downcase).html(:escape => false, :line_numbers => :inline)
|
||||
end
|
||||
content
|
||||
end
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace :redmine do
|
||||
set_table_name :milestone
|
||||
|
||||
def due
|
||||
if read_attribute(:due) > 0
|
||||
if read_attribute(:due) && read_attribute(:due) > 0
|
||||
Time.at(read_attribute(:due)).to_date
|
||||
else
|
||||
nil
|
||||
|
||||
Reference in New Issue
Block a user