fix display of FIMB quiz questions on rails 3
fixes CNVS-13790 string manipulation just lost the html_safe flag on rails 3, but not rails 2 test plan: * create a quiz with a fill in multiple blanks question * preview it * it should render the question correctly, not have a bunch of raw html Change-Id: I399874707a880e55c3772e5a780ff595de9062d6 Reviewed-on: https://gerrit.instructure.com/37188 Tested-by: Jenkins <jenkins@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Reviewed-by: Ahmad Amireh <ahmad@instructure.com> Product-Review: Brian Palmer <brianp@instructure.com>
This commit is contained in:
parent
20737f3d74
commit
871d979f6b
|
@ -432,7 +432,8 @@ module QuizzesHelper
|
|||
res.gsub! /\{\{question_[^}]+\}\}/, ""
|
||||
end
|
||||
|
||||
res
|
||||
# all of our manipulation lost this flag - reset it
|
||||
res.html_safe
|
||||
end
|
||||
|
||||
def multiple_dropdowns_question(options)
|
||||
|
|
|
@ -233,6 +233,7 @@ describe QuizzesHelper do
|
|||
)
|
||||
|
||||
html.should == %q|<input name="question_1" 'value='><script>alert('ha!')</script><img' readonly="readonly" aria-label='Fill in the blank, read surrounding text' />|
|
||||
html.should be_html_safe
|
||||
end
|
||||
|
||||
it 'should add an appropriate label' do
|
||||
|
|
Loading…
Reference in New Issue