• Resolved jonsakas

    (@jonsakas)


    If I use some custom JavaScript with && condition, it is encoded to && – which breaks the code.

    Example:

    
    function shouldOpen () {
      if (window.someVar && window.someOtherVar) {
        return true
      }
      return false
    }
    

    it becomes:

    
    function shouldOpen () {
      if (window.someVar & amp;& amp; window.someOtherVar) {
        return true
      }
      return false
    }
    

    Which is not a valid function block to pass to the Function constructor.

    • This topic was modified 4 years, 11 months ago by jonsakas.
    • This topic was modified 4 years, 11 months ago by jonsakas.
Viewing 1 replies (of 1 total)
  • Hi @jonsakas ,

    Hope you are doing fine.
    Thank you for the message.

    Please download this file and replace it with the one that you have:
    https://we.tl/t-DOJar8Tid1

    The file is in this directory:
    your_wordpress_folder/wp-content/plugins/popup-builder/public/js/PopupBuilder.js

    Then please clear the cache, implement a hard refresh and let us know how it works.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom JS is HTML encoded, invalidating code’ is closed to new replies.