summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Schroeder <alex@gnu.org>2022-07-07 11:43:08 +0200
committerAlex Schroeder <alex@gnu.org>2022-07-07 11:43:08 +0200
commit5a3dae2ef0f2b67c2582b32fc4e1fe928096607f (patch)
tree342467d0ef230f8a06538a2452db4e01ab0300f3
parenta7b5d9c96032439cd06a574b5896dd3b3ec1484c (diff)
Escape apostrophes in regular expression
This confuses parsers while editing.
-rw-r--r--gridmapper.svg2
1 files changed, 1 insertions, 1 deletions
diff --git a/gridmapper.svg b/gridmapper.svg
index cbc2e89..c015a40 100644
--- a/gridmapper.svg
+++ b/gridmapper.svg
@@ -1465,7 +1465,7 @@ function save () {
+ 'and the third line for a summary.');
return;
}
- if (inputs[0].search(/^([-,.()'%&?;<> _1-9A-Za-z\u0080-\ufffd]|[-,.()'%&?;<> _0-9A-Za-z\u0080-\ufffd][-,.()'%&?;<> _0-9A-Za-z\u0080-\ufffd]+)$/) !== 0) {
+ if (inputs[0].search(/^([-,.()\'%&?;<> _1-9A-Za-z\u0080-\ufffd]|[-,.()\'%&?;<> _0-9A-Za-z\u0080-\ufffd][-,.()\'%&?;<> _0-9A-Za-z\u0080-\ufffd]+)$/) !== 0) {
message('Unfortunately, this name is not a valid wiki page name');
return;
}