diff --git a/app/models/issue.rb b/app/models/issue.rb index f47e1c6f9..4c5e77cb5 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -564,8 +564,10 @@ class Issue < ActiveRecord::Base end # 缺陷的短描述信息 def short_description(length = 255) - description.gsub(/<\/?.*?>/,"").html_safe if description + # 不再使用短描述 + #description.gsub(/<\/?.*?>/,"").html_safe if description #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description + description end private :workflow_rule_by_attribute diff --git a/app/models/news.rb b/app/models/news.rb index 66e339291..860dd0baa 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -76,8 +76,10 @@ class News < ActiveRecord::Base # 新闻的短描述信息 def short_description(length = 255) - description.gsub(/<\/?.*?>/,"").html_safe if description + #description.gsub(/<\/?.*?>/,"").html_safe if description #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description + # 不再使用短描述 + description end private diff --git a/app/models/open_source_project.rb b/app/models/open_source_project.rb index 2de5966bb..4a657edb4 100644 --- a/app/models/open_source_project.rb +++ b/app/models/open_source_project.rb @@ -85,7 +85,9 @@ class OpenSourceProject < ActiveRecord::Base def short_description(length = 255) #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description - description.gsub(/<\/?.*?>/,"").html_safe if description + #description.gsub(/<\/?.*?>/,"").html_safe if description + # 不再使用短描述 + description end def applied_by?(user) diff --git a/app/models/project.rb b/app/models/project.rb index b68fc6aa9..d6420dd2d 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -630,7 +630,9 @@ class Project < ActiveRecord::Base # Returns a short description of the projects (first lines) def short_description(length = 255) #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description - description.gsub(/<\/?.*?>/,"").html_safe if description + # 不再使用短描述 + # description.gsub(/<\/?.*?>/,"").html_safe if description + description end def css_classes diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index c3bd120da..35ac5eda1 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -150,7 +150,7 @@