diff --git a/.svglintrc.js b/.svglintrc.js index 334cf5271..e822e161f 100644 --- a/.svglintrc.js +++ b/.svglintrc.js @@ -90,7 +90,7 @@ module.exports = { iconIgnored.size.hasOwnProperty(iconPath) || iconIgnored.center.hasOwnProperty(iconPath) ) { - return + return; } const targetCenter = iconSize / 2; diff --git a/scripts/build-package.js b/scripts/build-package.js index d2cdd71f1..065ba591f 100644 --- a/scripts/build-package.js +++ b/scripts/build-package.js @@ -28,7 +28,7 @@ const { titleToFilename } = require("./utils"); // Local helper functions function escape(value) { - return value.replace(/'/g, "\\'"); + return value.replace(/(? ( htmlFriendlyTitle - .replace(/&/g, "&") .replace(/'/g, "’") + .replace(/&/g, "&") ) } diff --git a/site_script.js b/site_script.js index 757d1f00e..5a36b7e71 100644 --- a/site_script.js +++ b/site_script.js @@ -59,7 +59,7 @@ // - https://davidwalsh.name/query-string-javascript // - https://github.com/WebReflection/url-search-params function getUrlParameter(parameter) { - name = parameter.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); + var name = parameter.replace(/[\[]/g, '\\[').replace(/[\]]/g, '\\]'); var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); var results = regex.exec(location.search); return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); @@ -84,9 +84,9 @@ queryLetters = query.split(''); var matchedIcons = icons.filter(function(iconName, iconIndex) { - var element = $icons[iconIndex], - score = iconName.length - query.length; - index = 0; + var element = $icons[iconIndex]; + var score = iconName.length - query.length; + var index = 0; for (var i = 0; i < queryLetters.length; i++) { var letter = queryLetters[i];