]> source.dussan.org Git - redmine.git/commitdiff
Strip pre/code tags content from activity view events.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 23 Jun 2008 17:06:58 +0000 (17:06 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 23 Jun 2008 17:06:58 +0000 (17:06 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1579 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/projects_helper.rb

index 49a2e572134ff00e5668a6f9ebe46be6636366da..5d51e7075b0ace6f6c7ad661667739a3dd39d188 100644 (file)
@@ -30,7 +30,7 @@ module ProjectsHelper
   end
   
   def format_activity_description(text)
-    h(truncate(text, 250))
+    h(truncate(text, 250).gsub(%r{<(pre|code)>.*$}m, '...'))
   end
   
   def project_settings_tabs