-2

I have inherited an old CMS website. I have enabled Google Maps API successfully, however the site is translating the &reg part of the API call into a HTML Entity.

The integrated page editor offers a markup escape/ignore option: encase the relevant code within curly brackets. Unfortunately, it doesnt work - tha maps fails to load:

{{<script async defer src="https://maps.googleapis.com/maps/api/js?key=[myAPIkey]callback=initMap&region=GB"type="text/javascript"></script>}}

I tried encasing only the &reg characters in curly brackets, and it still fails.

I tried this also, and again the map fails to load. Editing the page, shows the &reg being translated as a symbol:

<script async defer src={{"https://maps.googleapis.com/maps/api/js?key=AIzaSyDHhAPjTOvz9x0cMRid6LEUkfUePamRIxs&callback=initMap®ion=GB"}}

Is there an alternative way to set a location for searches?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Struggler
  • 25
  • 6

1 Answers1

0

I discovered this alternative to the ampersand symbol: [‘amp‘]

Using this, the script tag is translated correctly.

Struggler
  • 25
  • 6