add support for pre tags in dtext

This commit is contained in:
albert
2013-03-20 15:09:35 -07:00
parent 0c9a60040c
commit 05aaefdf48
4 changed files with 466 additions and 7 deletions

View File

@@ -202,7 +202,7 @@ class DText
Sanitize.clean(
text,
:elements => %w(code center tn h1 h2 h3 h4 h5 h6 a span div blockquote br p ul li ol em strong small big b i font u s),
:elements => %w(code center tn h1 h2 h3 h4 h5 h6 a span div blockquote br p ul li ol em strong small big b i font u s pre),
:attributes => {
"a" => %w(href title style),
"span" => %w(class style),

View File

@@ -38,10 +38,6 @@ module PostSets
end
def posts
if tag_array.size > 2 && !CurrentUser.is_privileged?
raise SearchError.new("Upgrade your account to search more than two tags at once")
end
if tag_array.any? {|x| x =~ /^source:.*\*.*pixiv/} && !CurrentUser.user.is_builder?
raise SearchError.new("Your search took too long to execute and was canceled")
end