Fix issues where bad user code hits the tail
This commit is contained in:
@ -35,7 +35,7 @@ $(document).ready(function() {
|
|||||||
.flatMap(code => {
|
.flatMap(code => {
|
||||||
return common.detectUnsafeCode$(code)
|
return common.detectUnsafeCode$(code)
|
||||||
.map(() => {
|
.map(() => {
|
||||||
const combinedCode = common.head + code + common.tail;
|
const combinedCode = common.head + '\n;;' + code + '\n;;' + common.tail;
|
||||||
|
|
||||||
return addLoopProtect(combinedCode);
|
return addLoopProtect(combinedCode);
|
||||||
})
|
})
|
||||||
|
@ -18,7 +18,7 @@ window.common = (function(global) {
|
|||||||
const originalCode = code;
|
const originalCode = code;
|
||||||
const head = common.arrayToNewLineString(common.head);
|
const head = common.arrayToNewLineString(common.head);
|
||||||
const tail = common.arrayToNewLineString(common.tail);
|
const tail = common.arrayToNewLineString(common.tail);
|
||||||
const combinedCode = head + code + tail;
|
const combinedCode = head + '\n;;' + code + '\n;;' + tail;
|
||||||
|
|
||||||
ga('send', 'event', 'Challenge', 'ran-code', common.challengeName);
|
ga('send', 'event', 'Challenge', 'ran-code', common.challengeName);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user