Commit 0de4f5c2f2407a8fcdfd6a1440b9eef930fee993
- Date: Tue Apr 29 15:50:34 +0000 2008
- Committer: David A. Cuadrado (krawek@gmail.com)
- Author: David A. Cuadrado (krawek@gmail.com)
- Commit SHA1: 0de4f5c2f2407a8fcdfd6a1440b9eef930fee993
- Tree SHA1: 3e9cd76f2e07a68cf7a345c3d30833d887178f69
Sanitize the README content
Signed-off-by: David A. Cuadrado <krawek@gmail.com>
Commit diff
| |   |
| 233 | 233 | |
| 234 | 234 | return "" if possibilities.empty? |
| 235 | 235 | text = repository.git.git.show({}, "master:#{possibilities.first}") |
| 236 | | markdown(text) rescue text.gsub("\n", "<br/>") |
| 236 | markdown(text) rescue simple_format(sanitize(text)) |
| 237 | 237 | end |
| 238 | 238 | |
| 239 | 239 | def file_path(repository, filename, head = "master") |
| toggle raw diff |
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -233,7 +233,7 @@ module ApplicationHelper
return "" if possibilities.empty?
text = repository.git.git.show({}, "master:#{possibilities.first}")
- markdown(text) rescue text.gsub("\n", "<br/>")
+ markdown(text) rescue simple_format(sanitize(text))
end
def file_path(repository, filename, head = "master") |