Fixed issue with slugify where single curly quotes in titles would translate to straight single quote (fixes #2101)

This commit is contained in:
Djamil Legato
2021-05-02 22:06:30 -07:00
parent 084002bd77
commit fa0c13bf85
3 changed files with 6 additions and 2 deletions

View File

@@ -6,6 +6,8 @@
* 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)
1. [](#bugfix)
* Fixed issue with slugify where single curly quotes in titles would translate to straight single quote [#2101](https://github.com/getgrav/grav-plugin-admin/issues/2101)
# v1.10.14
## 04/29/2021

View File

@@ -20,7 +20,7 @@ title.on('input focus blur', (event) => {
if (custom) { return true; }
let elements = getFields('title', event.currentTarget);
let slug = $.slugify(elements.title.val(), {custom: {"'": ''}});
let slug = $.slugify(elements.title.val(), {custom: { "'": '', '': '', '': '' }});
elements.folder.val(slug);
});

View File

@@ -2510,7 +2510,9 @@ title.on('input focus blur', function (event) {
var elements = getFields('title', event.currentTarget);
var slug = external_jQuery_default().slugify(elements.title.val(), {
custom: {
"'": ''
"'": '',
'': '',
'': ''
}
});
elements.folder.val(slug);