mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-12-16 01:10:30 +02:00
Escape icon title for object key (#2710)
This commit is contained in:
parent
6adef65a54
commit
412ccc0a6d
@ -31,7 +31,8 @@ function escape(value) {
|
||||
return value.replace(/'/g, "\\'");
|
||||
}
|
||||
function iconToKeyValue(icon) {
|
||||
return `'${icon.title}':${iconToObject(icon)}`;
|
||||
const iconTitle = escape(icon.title);
|
||||
return `'${iconTitle}':${iconToObject(icon)}`;
|
||||
}
|
||||
function iconToObject(icon) {
|
||||
return util.format(iconObjectTemplate,
|
||||
|
Loading…
Reference in New Issue
Block a user