From a2addba62cbfa2ad61fd9986bd90e22e8eeca81d Mon Sep 17 00:00:00 2001 From: Peter Akers Date: Mon, 4 Mar 2024 07:08:08 +1000 Subject: [PATCH] Fix for Function Maps with spaces in the name --- Changelog.md | 3 +++ index.html | 2 +- js/exwebthrottle.js | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 25a8cdc..5786cd7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,6 @@ +# Version 1.3.14 +- Fix for Function Maps with spaces in the name + # Version 1.3.13 - attempt to reduce caching diff --git a/index.html b/index.html index ec93153..06aedb7 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,7 @@ diff --git a/js/exwebthrottle.js b/js/exwebthrottle.js index c45235a..1ae44b9 100644 --- a/js/exwebthrottle.js +++ b/js/exwebthrottle.js @@ -1012,7 +1012,9 @@ $(document).ready(function(){ }) $(document).on("click", ".map-name", function () { - loadMapData($(this).attr("map-val")); + const ename = $(this).attr("map-val"); + const name = unescape(ename); + loadMapData(name); $("li.map-name").removeClass("active"); $(this).addClass("active"); }); @@ -1060,7 +1062,8 @@ function setFunctionMaps() { $("#function-mappings").empty(); maps.forEach(map => { const name = map.mname - $("#function-mappings").append(`
  • ${name}
  • `); + const ename = escape(name); + $("#function-mappings").append(`
  • ${name}
  • `); }) }