Skip to content

Commit

Permalink
add support for special characters in questions
Browse files Browse the repository at this point in the history
  • Loading branch information
rofl256 committed Jun 9, 2017
1 parent 83416bd commit 4f07682
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ function saveQuestions() {
objToSave.push(oneQ);
});
var jsonQues = JSON.stringify(objToSave);
jsonQues = btoa(jsonQues);
jsonQues = btoa(encodeURIComponent(jsonQues));
wsSend("fileOp","write###fragen.txt###"+jsonQues);
}

Expand Down
2 changes: 1 addition & 1 deletion web/js/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ var connectWs = function() {
} else if(key == "file") {
if(value == "fragen.txt") {
try {
var base64 = atob(messageParts_a[2]);
var base64 = decodeURIComponent(atob(messageParts_a[2]));
fragen = JSON.parse(base64);
fillFragenEditor();
fillFragenSelect();
Expand Down

0 comments on commit 4f07682

Please sign in to comment.