Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    What is the url of your site? You don’t have an & in the title in the admin area?

    Thread Starter James Spencer

    (@js-enigma)

    There are & in the title of some stores yes.

    Currently the site isn’t live i’m afraid.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    I found a fix, and I will include it in a future update.

    You can fix it now by opening the /js/wpsl-gmap.js, and add this to the js file.

    function decodeHtmlEntity(str) {
    	return str.replace( /&#(\d+);/g, function( match, dec) {
    		return String.fromCharCode( dec );
    	});
    };

    Then on line 1249 you should see this. if not then just search for it.

    title: infoWindowData.store,

    Replace it with this.

    title: decodeHtmlEntity( infoWindowData.store ),

    The wpsl-gmap.js file itself isn’t used on the front-end, that’s the wpsl-gmap.min.js ( the minified version ). So you have to minifiy the code from the modified wpsl-gmap.js on a site like https://javascript-minifier.com/, and then place the minified code in the wpsl-gmap.min.js file.

    Let me know if this fixes the issue for you.

    Thread Starter James Spencer

    (@js-enigma)

    Hi Tijmen,

    I added the code to the development site I have and once I minify the code the search function stops working completely and no results are shown.

    I think I must be doing something wrong as prior to this everything works.

    Hope you can help.
    James

    Thread Starter James Spencer

    (@js-enigma)

    Just a quick update, when I have added the new code the dropdowns for search radius and results are missing also.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Try this code, and place it in the wpsl-gmap.min.js

    Do you use any caching plugins? If so, make sure to flush the cache.

    If the map still breaks, can you check for JS errors in your browser, and let me know what is says.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    So I did find a problem in the code.

    It works fine for me if I autoload the locations, but when I do a manual search, then it also breaks. And I only tested it with the autoload option, it probably returned a cache version and that’s why it didn’t break.

    Can you try the new code, just place it in the wpsl-gmap.min.js.

    Many thanks for this fix Tijmen, much appreciated – looks so much better now.

    Great plugin, love it – much better than the last one I used. Cheers.

    Thread Starter James Spencer

    (@js-enigma)

    Hi Tijmen,

    Sorry for the delay in replying, initially this now looks to be working.

    I will keep testing to make sure and feedback the results.

    Thanks again for your hard work.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Ampersand displayed in map hover.’ is closed to new replies.