edit: support dashes in placeholder parameters
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 9 Jul 2018 22:53:35 +0000 (00:53 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 9 Jul 2018 23:52:57 +0000 (01:52 +0200)
Fix date input.

edit.js

diff --git a/edit.js b/edit.js
index a7d098c0b3c3b2dde86078f7033158fa5b10c3bb..a24fee88bd1f1edac13aa3f6c69ed78b9fe8ab67 100644 (file)
--- a/edit.js
+++ b/edit.js
@@ -126,7 +126,7 @@ if (pagebody) {
                editlink.onclick = undefined;
                pagebody.setAttribute('contenteditable', true);
                pagebody.innerHTML = pagebody.innerHTML
-                       .replace(/<!--BLOCK:([^-]*)-->[^]*?<!--\/-->/g, '$1');
+                       .replace(/<!--BLOCK:(.*?)-->[^]*?<!--\/-->/g, '$1');
                CKEDITOR.inline(pagebody);
                document.body.className = 'edit';
                return false;