I want to add google map javascript to a Thymeleaf template, like this:
https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places
It throws the exception:
org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 93; The reference to entity "key" must end with the ';' delimiter
I tried to change & to & but nothing changed.
Your help will be greatly appreciated. Thanks!
Thymeleaf uses XML parser, and the character & is considered a special character in XML. You have to replace & with its XML equvilant &.Your URL will be:
https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places
In thymeleaf 3, it won't be a problem since they wrote a new parser for thymeleaf.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With