JTidy doesn't correctly parse balanced angle brackets inside XML comments (<!-- ... -->). Angle brackets should be allowed as literals in this case [1], but JTidy does not do this properly.

      To replicate this, create a user macro with the following content:

      <script>
      <!--
      if (4 < 5 && 3 > 2) alert("Oops.");
      // -->
      </script>

      Include the user macro in a page, and export it to PDF. The part of the user macro following the greater-than sign is included in the PDF text.

      The same bug exists for CDATA sections and browsers do not seem to understand correctly-escaped Javascript using > and <, at least in HTML 4.0 mode.

      A workaround is to remove the greater-than sign (>) by using a negative condition.

      if (4 < 5 && !(3 <= 2)) alert("Oops.");

      This was identifed by a plugin author attempting to put commented Javascript in his Velocity template [2].

      [1] http://www.w3.org/TR/REC-xml/#sec-comments
      [2] http://forums.atlassian.com/thread.jspa?messageID=257229977

            [CONFSERVER-6490] PDF export breaks with angle brackets inside comments

            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2895873 ] New: CONFSERVER Bug Workflow v4 [ 2988498 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2786671 ] New: JAC Bug Workflow v3 [ 2895873 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2716970 ] New: JAC Bug Workflow v2 [ 2786671 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2374618 ] New: JAC Bug Workflow [ 2716970 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 2260689 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2374618 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2207800 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 2260689 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2185921 ] New: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2207800 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 1944071 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2185921 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v3 [ 1741209 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 1944071 ]
            Katherine Yabut made changes -
            Workflow Original: CONF Bug Subtask WF (TEMP) [ 1701523 ] New: Confluence Workflow - Public Facing - Restricted v3 [ 1741209 ]

              mjensen m@ (Inactive)
              matt@atlassian.com Matt Ryall
              Affected customers:
              5 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: