fix script tag importing issue in coursewares
This commit is contained in:
@ -107,11 +107,11 @@ var tests = tests || [];
|
|||||||
var allSeeds = '';
|
var allSeeds = '';
|
||||||
(function() {
|
(function() {
|
||||||
challengeSeed.forEach(function(elem) {
|
challengeSeed.forEach(function(elem) {
|
||||||
allSeeds += elem + '\n';
|
allSeeds += elem.replace(/fccss/g, '<script>').replace(/fcces/g,'</script>') + '\n';
|
||||||
});
|
});
|
||||||
|
editor.setValue(allSeeds);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
editor.setValue(allSeeds);
|
|
||||||
|
|
||||||
function doLinting () {
|
function doLinting () {
|
||||||
editor.operation(function () {
|
editor.operation(function () {
|
||||||
|
@ -3420,14 +3420,15 @@
|
|||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert($('#target').hasClass('disabled'), 'The button with the ID of \"target\" should continue to have the \"disabled\" class.')",
|
"assert($('#target').hasClass('disabled'), 'The button with the ID of \"target\" should continue to have the \"disabled\" class.')",
|
||||||
"assert($('#target').attr('disabled', true), 'Enable the button with the ID of \"target\" by using jQuery.')"
|
"assert(!!$('#target[disabled]'), 'Enable the button with the ID of \"target\" by using jQuery.')",
|
||||||
|
"expect($('#target')).to.exist()"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"<script>",
|
"fccss",
|
||||||
" $(document).ready(function() {",
|
" $(document).ready(function() {",
|
||||||
" $('#target').attr('disabled', true)",
|
" $('#target').attr('disabled', true)",
|
||||||
" });",
|
" });",
|
||||||
"</script>",
|
"fcces",
|
||||||
"<button id='target' class='btn btn-primary btn-block'>Enable this button with jQuery</button>"
|
"<button id='target' class='btn btn-primary btn-block'>Enable this button with jQuery</button>"
|
||||||
],
|
],
|
||||||
"challengeType": 0
|
"challengeType": 0
|
||||||
|
Reference in New Issue
Block a user