Skip to content
Snippets Groups Projects
Commit 24ac1cb0 authored by Nils G.'s avatar Nils G.
Browse files

Replace ' with ’ (clientside) and only allow the latter (u+2019) to be stored

parent 25628986
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment