ensures rel="nofollow" is added to all anchors if a page is retrieved with a SHA

This commit is contained in:
rick
2010-09-30 17:19:37 -07:00
parent cc929bbc56
commit 4dbe3ea844
4 changed files with 75 additions and 20 deletions
+5
View File
@@ -59,6 +59,11 @@ module Gollum
'img' => {'href' => ['http', 'https', :relative]}
}
}
HISTORY_SANITIZATION_OPTIONS = SANITIZATION_OPTIONS.merge(
:add_attributes => {
'a' => {'rel' => 'nofollow'}
}
)
class Error < StandardError; end
class DuplicatePageError < Error