Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-20235

Attach screenshot link doesn't work if group name includes "

    XMLWordPrintable

Details

    Description

      The screenshot applet doesn't open due to a javascript error when a group name includes quotes ("). They quotes aren't being escaped properly in the json configuration that is included on the page thus breaking the javascript.

      For example with a group called 'Team "Road Map"' and groups as well as project roles enabled for comment security levels you get this bit of javascript in the page which breaks (notice 'comment.group.name.0':"Team "Road Map""):

      <script>
          var version = '1.5';
          var attributes = {
              codebase:"/jira/secure/",
          	code:"com.atlassian.jira.screenshot.applet.ScreenshotApplet.class",
              archive:"applet/screenshot.jar",
              width:710,
              height:540
          };
          var parameters = {
              scriptable:"false",
              post:"AttachFile.jspa?attachScreenshot=true",
              issue:10001,
              screenshotname:"screenshot-1",
              after:"ManageAttachments!default.jspa?id=10001",
              encoding:"UTF-8",
              useragent:"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6",
              'comment.group.name.0':"Team "Road Map"",
              'comment.group.name.1':"jira-developers",
              'comment.group.name.2':"jira-administrators",
              'comment.group.name.3':"jira-users",
              'comment.role.0':"10002|Administrators",
              'comment.role.1':"10001|Developers",
              'comment.role.2':"10000|Users",
              'paste.text':"Paste",
              'filename.text':"File name:",
              'errormsg.filename.text':"ERROR: The filename must not contain the characters:",
              'comment.text':"Update comment:",
              'attach.text':"Attach",
              'cancel.text':"Cancel",
              'badconfiguration.text':"Bad Applet Configuration.",
              'comment.level.text':"Comment Viewable By",
              'allusers.text':"All Users",
              'projectroles.text':"Project Roles",
              'groups.text':"Groups",
              'security.text':"Applet security not setup correctly.  You must accept this applet's certificate for it to run."
          };
          deployJava.runApplet(attributes, parameters, version);
      </script>
      

      Attachments

        Activity

          People

            jpendleton Justus Pendleton (Inactive)
            andreask@atlassian.com Andreas Knecht (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: