diff --git a/CHANGELOG.md b/CHANGELOG.md index d602d158..4eed169a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Updated node modules dev dependencies * Package.json scripts cleanup * Recompiled JS for production + * Editor: Do not assume images URLs are going to be `http://` (wrong assumption plus not SSL) [#2127](https://github.com/getgrav/grav-plugin-admin/issues/2127) # v1.10.14 ## 04/29/2021 diff --git a/themes/grav/app/forms/fields/editor/buttons.js b/themes/grav/app/forms/fields/editor/buttons.js index 56a18fd8..14d40d78 100644 --- a/themes/grav/app/forms/fields/editor/buttons.js +++ b/themes/grav/app/forms/fields/editor/buttons.js @@ -242,7 +242,7 @@ export default { label: '', modes: ['gfm', 'markdown'], action({ codemirror, button, textarea }) { - replacer({ name: 'image', replace: '![$1](http://$cur)', codemirror, button }); + replacer({ name: 'image', replace: '![$1]($cur)', codemirror, button }); } } }, { diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js index 548ddf9a..617f93f9 100644 --- a/themes/grav/js/admin.min.js +++ b/themes/grav/js/admin.min.js @@ -3470,7 +3470,7 @@ var flipDisabled = function flipDisabled(codemirror, button, type) { textarea = _ref17.textarea; replacer({ name: 'image', - replace: '![$1](http://$cur)', + replace: '![$1]($cur)', codemirror: codemirror, button: button });