Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17174

Javascript proxy failes when sending html/xml formated messages

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • Jenkins 1.480.3 tested on Ubuntu 12.04 and Windows 7 both using debuging in maven and tomcat

      In Jenkins 1.480.3 we can no longer send HTML or XML formated texts using JavaScript Proxy. It works in 1.466 and for HTML and partly in 1.480.1.

      function broken()
      {
      var promote = <st:bind value="${it}"/>
      document.getElementById('result').innerHTML="";
      promote.doStuff(function(t)

      { document.getElementById('result').innerHTML= t.responseObject(); }

      )
      }
      In this case the function(t) code will not be executed if the method returns code with HTML or XML tags.

      I made a small example plugin https://github.com/hanabishi/js-breaker

          [JENKINS-17174] Javascript proxy failes when sending html/xml formated messages

          Marcus Jacobsson created issue -
          Marcus Jacobsson made changes -
          Environment Original: tested on Ubuntu 12.04 and Windows 7 both using debuging in maven and tomcat New: Jenkins 1.480.3 tested on Ubuntu 12.04 and Windows 7 both using debuging in maven and tomcat
          Marcus Jacobsson made changes -
          Fix Version/s New: current [ 10162 ]
          Description Original: In Jenkins 1.480.3 we can no longer send HTML or XML formated texts using JavaScript Proxy. It works in 1.466 and for HTML (not XML) in 1.480.1.

          function broken()
          {
              var promote = <st:bind value="${it}"/>
              document.getElementById('result').innerHTML="";
              promote.doStuff(function(t) {
                  document.getElementById('result').innerHTML= t.responseObject();
              })
          }
          In this case the function(t) code will not be executed if the method returns code with HTML or XML tags.

          I made a small example plugin https://github.com/hanabishi/js-breaker
          New: In Jenkins 1.480.3 we can no longer send HTML or XML formated texts using JavaScript Proxy. It works in 1.466 and for HTML and partly in 1.480.1.

          function broken()
          {
              var promote = <st:bind value="${it}"/>
              document.getElementById('result').innerHTML="";
              promote.doStuff(function(t) {
                  document.getElementById('result').innerHTML= t.responseObject();
              })
          }
          In this case the function(t) code will not be executed if the method returns code with HTML or XML tags.

          I made a small example plugin https://github.com/hanabishi/js-breaker
          kutzi made changes -
          Priority Original: Blocker [ 1 ] New: Major [ 3 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-14827 [ JENKINS-14827 ]

          Jesse Glick added a comment -

          Seems to have been fixed in 1.506, presumably by json-lib upgrade.

          Jesse Glick added a comment - Seems to have been fixed in 1.506, presumably by json-lib upgrade.
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 148006 ] New: JNJira + In-Review [ 192676 ]

            Unassigned Unassigned
            hanabishi Marcus Jacobsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: