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 &

          [CMS-8246] Javascript inserted with last publication insertion does not work

          Raphaël Franchet made changes -
          Estimation New: 3 - Complex [ 10221 ]
          Fix Version/s New: 4.LATER [ 13984 ]
          Fix Version/s Original: 4.2.0 [ 14425 ]
          Fix Version/s Original: 4.1.8 [ 14654 ]
          Internal review New: 2 - Long term [ 10217 ]
          Raphaël Franchet made changes -
          Fix Version/s New: 4.1.8 [ 14654 ]
          Fix Version/s Original: 4.1.7 [ 14647 ]
          Raphaël Franchet made changes -
          Fix Version/s New: 4.1.7 [ 14647 ]
          Fix Version/s Original: 4.1.6 [ 14629 ]
          Raphaël Franchet made changes -
          Fix Version/s New: 4.1.6 [ 14629 ]
          Fix Version/s Original: 4.1.5 [ 14601 ]
          Cédric Damioli made changes -
          Fix Version/s New: 4.1.5 [ 14601 ]
          Fix Version/s Original: 4.1.4 [ 14581 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1.4 [ 14581 ]
          Fix Version/s Original: 4.1.3 [ 14549 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1.3 [ 14549 ]
          Fix Version/s Original: 4.1.2 [ 14535 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1.2 [ 14535 ]
          Fix Version/s Original: 4.1.1 [ 14481 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1.1 [ 14481 ]
          Fix Version/s New: 4.2.0 [ 14425 ]
          Fix Version/s Original: 4.1.0 [ 13987 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1 [ 13987 ]

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

              Created:
              Updated: