|
|
|
@ -15,6 +15,17 @@ module ApplicationHelper
|
|
|
|
|
EduSetting.get(name)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# xss共计问题
|
|
|
|
|
def content_safe content
|
|
|
|
|
tags = %w(
|
|
|
|
|
a abbr b bdo blockquote br caption cite code col colgroup dd del dfn dl
|
|
|
|
|
dt em figcaption figure h1 h2 h3 h4 h5 h6 hgroup i img ins kbd li mark
|
|
|
|
|
ol p pre q rp rt ruby s samp small strike strong sub sup table tbody td
|
|
|
|
|
tfoot th thead time tr u ul var wbr div span
|
|
|
|
|
)
|
|
|
|
|
sanitize content, tags: tags
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def graduation_navigation graduation
|
|
|
|
|
graduation.class.to_s == "GraduationTopic" ? "毕设选题" : "毕设任务"
|
|
|
|
|
end
|
|
|
|
|