6 Replies Latest reply on Mar 6, 2017 1:49 PM by Sanford Whiteman

    jquery ">" getting replaced with ">"

    Charles Sanderson

      I've got a pretty simple javascript being dropped into a landing page. I created an editable field in the template, so that should I need any javascript on a page, I can just add it when I'm setting a new one up. (in template like this: )

           <script>

                  // <![CDATA[

                       {{my.Footer js}}
                  // ]]>
            </script>

       

      But... I just ran into an oddball issue. I dropped in a really simple JS and it's converting my "greater than" symbol to html character. Is there a way to prevent this, or does somebody know maybe another way to do the below and avoid the problem? the script won't fire because it's showing "&gt; -1" EDIT: I should add that I did try to escape it with />, but that didn't work either.

       

      $(document).ready(function () {

      if (window.location.search.indexOf('choice=chocolate') > -1) {

          alert('yes choc');

      } else {

          alert('no choc');

      }

      });