diff --git a/controllers/player.py b/controllers/player.py index ce255bcbca0b68a66f17c0b78f0e0a8f8cb8bdc4..d0c2017d45b3df8cfe1998d8b5239401974ba173 100644 --- a/controllers/player.py +++ b/controllers/player.py @@ -102,7 +102,7 @@ def submit(): if "length" in input_definitions[key] and len(inputs[key]) > input_definitions[key]["length"]: return(FAIL(CODE_MISSING)) - inputs[key] = ''.join(c for c in inputs[key] if (c.isalnum() or c in " ,.!?-()")) + inputs[key] = ''.join(c for c in inputs[key] if (c.isalnum() or c in " ,.!?-()\u2019")) new_input["inputs"] = inputs diff --git a/static/game/bootstrap/renderer.js b/static/game/bootstrap/renderer.js index d1f61a01f8f84e73461a0e9c385d869b1f134315..76865f09e0d8aa15e2ad4f7e3169ff9c6684cce8 100644 --- a/static/game/bootstrap/renderer.js +++ b/static/game/bootstrap/renderer.js @@ -203,7 +203,10 @@ function submit(_button) { switch (element.getAttribute("type")) { case "text": inputs[element.getAttribute("name")] = element.value.replace( - /[^\u0020\u0021\u0028\u0029\u002C-\u002E\u003F\u00BF-\u1FFF\u2C00-\uD7FF\w]/g, + /[\u0027]/g, + "\u2019" + ).replace( + /[^\u0020\u0021\u0028\u0029\u002C-\u002E\u003F\u00BF-\u1FFF\u2C00-\uD7FF\u2019\w]/g, " " ); break;