lib/polyblock/capybara_helpers.rb in polyblock-1.0.7 vs lib/polyblock/capybara_helpers.rb in polyblock-1.0.8
- old
+ new
@@ -12,10 +12,10 @@
raise "Locator #{locator} not found!!"
end
# Fill the editor content
page.execute_script <<-SCRIPT
var ckeditor = CKEDITOR.instances['#{locator}'];
- ckeditor.setData('#{params[:with]}');
+ ckeditor.setData('#{params[:with].gsub("'", "\\'")}');
ckeditor.focus();
setTimeout(function(){
ckeditor.updateElement();
}, 1);
SCRIPT