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:
Cody Cutrer 2014-07-02 10:12:06 -06:00 committed by Brian Palmer
parent 20737f3d74
commit 871d979f6b
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -233,6 +233,7 @@ describe QuizzesHelper do
)
html.should == %q|<input name="question_1" 'value=&#x27;&gt;&lt;script&gt;alert(&#x27;ha!&#x27;)&lt;/script&gt;&lt;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