Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-8246

Javascript inserted with last publication insertion does not work

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.LATER
    • None
    • None
    • None
    • 2 - Long term
    • 3 - Complex

      How to reproduce

      • Edit a newsletter
      • Insert a article with activated comments in "main" view thank to "last publication" insertion
      • Save
      • Preview the newsletter

      Some caracters like ' contained in inserted JS are escaped.

      For example

      if (/(\?|&)last-comment=highlight(#|&)/.test(window.location.href))
      {
           $j('#comments_9974759601760411 ul li:last').addClass('last-comment');
      }
      

      instead of

      if (/(\?|&)last-comment=highlight(#|&)/.test(window.location.href))
      {
      	$j("#<xsl:value-of select="$uniqueId"/> ul li:last").addClass("last-comment");
      }
      

      It leads to several errors : Uncaught SyntaxError: Unexpected token &

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: