From: Abijeet Date: Sun, 10 Jun 2018 11:59:30 +0000 (+0530) Subject: Fixes a corner case with exclamation in the ID. X-Git-Tag: v0.23.0~1^2~13 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/refs/pull/875/head?ds=inline Fixes a corner case with exclamation in the ID. Signed-off-by: Abijeet --- diff --git a/resources/assets/js/components/wysiwyg-editor.js b/resources/assets/js/components/wysiwyg-editor.js index a094359ec..a8a2ff175 100644 --- a/resources/assets/js/components/wysiwyg-editor.js +++ b/resources/assets/js/components/wysiwyg-editor.js @@ -501,7 +501,7 @@ class WysiwygEditor { } function scrollToText(scrollId) { - const element = editor.dom.get(scrollId) + const element = editor.dom.get(encodeURIComponent(scrollId).replace(/!/g, '%21')); if (!element) { return; }