properly URL escape maps links

This commit is contained in:
David 2022-03-20 17:14:08 -04:00
parent 58a5ecafef
commit 70f56425cc

View File

@ -562,13 +562,13 @@
<p> <p>
View in: View in:
<a <a
href="https://maps.google.com/maps?q={{& name}}+{{address}},{{city}},NY" href="https://maps.google.com/maps?q={{nameURLEscaped}} {{address}},{{city}},NY"
target="_blank" target="_blank"
>Google Maps</a >Google Maps</a
> >
{{#isAppleIsh}} {{#isAppleIsh}}
<a <a
href="http://maps.apple.com/?q={{& name}}&address={{address}},{{city}},NY" href="http://maps.apple.com/?q={{nameURLEscaped}}&address={{address}},{{city}},NY"
target="_blank" target="_blank"
>Apple Maps</a >Apple Maps</a
> >
@ -618,6 +618,7 @@
value.slug = slugify(value.name); value.slug = slugify(value.name);
value.cleanedWebsite = cleanWebsite(value.website); value.cleanedWebsite = cleanWebsite(value.website);
value.isAppleIsh = isAppleIsh; value.isAppleIsh = isAppleIsh;
value.nameURLEscaped = encodeURIComponent(value.name);
}); });
$("#storeCount").html(data.length); $("#storeCount").html(data.length);
window.data = data; window.data = data;