Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-22044

Multimedia macro does not support some special characters in filename

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 3.5
    • Macros - Multimedia
    • Standalone
      Windows XP
      Java 1.6.0_10

      Multimedia Macro does not support some special characters in filename

      Steps to Reproduce

      1. Upload a video format attachment onto a Confluence page
        • The attachment file name should include any special chracters below
          + % # & '
          

          MP4 format is used in this test

      2. Edit the page and insert a Multimedia Macro, choose the attachment uploaded from the previous steps
        Example Storage Format
        <p>
          <ac:structured-macro ac:macro-id="ce9a6432-928d-4ba2-a301-15d819a76e7e" ac:name="multimedia" ac:schema-version="1">
            <ac:parameter ac:name="name">
              <ri:attachment ri:filename="this + that.mp4"/>
            </ac:parameter>
          </ac:structured-macro>
        </p>
        
      3. Save the page

      Expected Results

      Multimedia macro is showing the video properly in the View Mode

      Actual Results

      Multimedia macro cannot render the video file due to the special character in file name

      Note

      Different special characters is trigerring different behavior where + % # will show the error message below:

      No video with supported format and MIME type found

      While & ' show the error message below:

      Error rendering macro 'multimedia'
      com.atlassian.renderer.v2.macro.MacroException: Cannot find attachment 'this & that.mp4'

      this & that.mp4 is the attachment file name used in this test

      Workaround

      Avoid using the known special chracters that will cause this issue in the file name

      This bug report has been updated to better reflect the issue. Below is the old bug report description

      The new multimedia macro will not find attached swf (flash) files if the filename has a ' in it.
      We have files already embedded using the !filename.swf! notation and they work fine (autoplay and all) but when I changed them to use the new {multimedia} notation there was an error message: "multimedia: Cannot find attachment 'ninja's.swf'"

      I've attached two files - the test swf file from the confluence documentation page with and without an apostrophe ' character in the filename so you can test it.

        1. error message 1.png
          error message 1.png
          30 kB
        2. error message 2.png
          error message 2.png
          27 kB
        3. ninja's.swf
          957 kB
        4. ninjas.swf
          957 kB

            [CONFSERVER-22044] Multimedia macro does not support some special characters in filename

            SET Analytics Bot made changes -
            Support reference count Original: 3 New: 4
            SET Analytics Bot made changes -
            Support reference count Original: 2 New: 3

            Hi Team,

             

            Issue still exist with version 7.13.7, can we please get a fix?

             

             

            Valiantys Support added a comment - Hi Team,   Issue still exist with version 7.13.7, can we please get a fix?    
            SET Analytics Bot made changes -
            Support reference count Original: 1 New: 2
            Bugfix Automation Bot made changes -
            Support reference count New: 1
            Damien Tan made changes -
            Link New: This issue relates to CONFSERVER-40901 [ CONFSERVER-40901 ]
            Damien Tan made changes -
            Description Original: [Multimedia Macro|https://confluence.atlassian.com/doc/multimedia-macro-228622735.html] does not support some special characters in filename

            h3. Steps to Reproduce
            # Upload a video format attachment onto a Confluence page
            #* The attachment file name should include _any_ special chracters below
            {code}
            + % # & '
            {code}
            (i) MP4 format is used in this test
            # Edit the page and insert a [Multimedia Macro|https://confluence.atlassian.com/doc/multimedia-macro-228622735.html], choose the attachment uploaded from the previous steps
            {code:title=Example Storage Format}
            <p>
              <ac:structured-macro ac:macro-id="ce9a6432-928d-4ba2-a301-15d819a76e7e" ac:name="multimedia" ac:schema-version="1">
                <ac:parameter ac:name="name">
                  <ri:attachment ri:filename="this + that.mp4"/>
                </ac:parameter>
              </ac:structured-macro>
            </p>
            {code}
            # Save the page

            h3. Expected Results
            Multimedia macro is showing the video properly in the View Mode

            h3. Actual Results
            Multimedia macro cannot render the video file due to the special character in file name


            h3. Note
            Different special characters is trigerring different behavior where {{+ % #}} will show the error message below:
            bq. No video with supported format and MIME type found
             !error message 1.png|thumbnail!

            While {{& '}} show the error message below:
            {quote}
            Error rendering macro 'multimedia'
            com.atlassian.renderer.v2.macro.MacroException: Cannot find attachment 'this & that.mp4'
            {quote}
            (i) {{this & that.mp4}} is the attachment file name used in this test
             !error message 2.png|thumbnail!

            h3. Workaround
            Avoid using the known special chracters that will cause this issue in the file name


            {panel}
            (i) This bug report has been updated to better reflect the issue. Below is the old bug report description

            The new multimedia macro will not find attached swf (flash) files if the filename has a ' in it.
            We have files already embedded using the \!filename.swf\! notation and they work fine (autoplay and all) but when I changed them to use the new \{multimedia\} notation there was an error message: "multimedia: Cannot find attachment 'ninja's.swf'"

            I've attached two files - the test swf file from the [confluence documentation page |http://confluence.atlassian.com/x/WTcC] with and without an apostrophe ' character in the filename so you can test it.
            {panel}
            New: [Multimedia Macro|https://confluence.atlassian.com/doc/multimedia-macro-228622735.html] does not support some special characters in filename

            h3. Steps to Reproduce
            # Upload a video format attachment onto a Confluence page
            #* The attachment file name should include _any_ special chracters below
            {code}
            + % # & '
            {code}
            (i) MP4 format is used in this test
            # Edit the page and insert a [Multimedia Macro|https://confluence.atlassian.com/doc/multimedia-macro-228622735.html], choose the attachment uploaded from the previous steps
            {code:title=Example Storage Format}
            <p>
              <ac:structured-macro ac:macro-id="ce9a6432-928d-4ba2-a301-15d819a76e7e" ac:name="multimedia" ac:schema-version="1">
                <ac:parameter ac:name="name">
                  <ri:attachment ri:filename="this + that.mp4"/>
                </ac:parameter>
              </ac:structured-macro>
            </p>
            {code}
            # Save the page

            h3. Expected Results
            Multimedia macro is showing the video properly in the View Mode

            h3. Actual Results
            Multimedia macro cannot render the video file due to the special character in file name


            h3. Note
            Different special characters is trigerring different behavior where {{+ % #}} will show the error message below:
            bq. No video with supported format and MIME type found
             !error message 1.png|thumbnail!

            While {{& '}} show the error message below:
            {quote}
            Error rendering macro 'multimedia'
            com.atlassian.renderer.v2.macro.MacroException: Cannot find attachment 'this & that.mp4'
            {quote}
            (i) {{this & that.mp4}} is the attachment file name used in this test
             !error message 2.png|thumbnail!

            h3. Workaround
            Avoid using the known special chracters that will cause this issue in the file name




            {panel}
            (i) This bug report has been updated to better reflect the issue. Below is the old bug report description

            The new multimedia macro will not find attached swf (flash) files if the filename has a ' in it.
            We have files already embedded using the \!filename.swf\! notation and they work fine (autoplay and all) but when I changed them to use the new \{multimedia\} notation there was an error message: "multimedia: Cannot find attachment 'ninja's.swf'"

            I've attached two files - the test swf file from the [confluence documentation page |http://confluence.atlassian.com/x/WTcC] with and without an apostrophe ' character in the filename so you can test it.
            {panel}
            Damien Tan made changes -
            Description Original: The new multimedia macro will not find attached swf (flash) files if the filename has a ' in it.
            We have files already embedded using the \!filename.swf\! notation and they work fine (autoplay and all) but when I changed them to use the new \{multimedia\} notation there was an error message: "multimedia: Cannot find attachment 'ninja's.swf'"

            I've attached two files - the test swf file from the [confluence documentation page |http://confluence.atlassian.com/x/WTcC] with and without an apostrophe ' character in the filename so you can test it.
            New: [Multimedia Macro|https://confluence.atlassian.com/doc/multimedia-macro-228622735.html] does not support some special characters in filename

            h3. Steps to Reproduce
            # Upload a video format attachment onto a Confluence page
            #* The attachment file name should include _any_ special chracters below
            {code}
            + % # & '
            {code}
            (i) MP4 format is used in this test
            # Edit the page and insert a [Multimedia Macro|https://confluence.atlassian.com/doc/multimedia-macro-228622735.html], choose the attachment uploaded from the previous steps
            {code:title=Example Storage Format}
            <p>
              <ac:structured-macro ac:macro-id="ce9a6432-928d-4ba2-a301-15d819a76e7e" ac:name="multimedia" ac:schema-version="1">
                <ac:parameter ac:name="name">
                  <ri:attachment ri:filename="this + that.mp4"/>
                </ac:parameter>
              </ac:structured-macro>
            </p>
            {code}
            # Save the page

            h3. Expected Results
            Multimedia macro is showing the video properly in the View Mode

            h3. Actual Results
            Multimedia macro cannot render the video file due to the special character in file name


            h3. Note
            Different special characters is trigerring different behavior where {{+ % #}} will show the error message below:
            bq. No video with supported format and MIME type found
             !error message 1.png|thumbnail!

            While {{& '}} show the error message below:
            {quote}
            Error rendering macro 'multimedia'
            com.atlassian.renderer.v2.macro.MacroException: Cannot find attachment 'this & that.mp4'
            {quote}
            (i) {{this & that.mp4}} is the attachment file name used in this test
             !error message 2.png|thumbnail!

            h3. Workaround
            Avoid using the known special chracters that will cause this issue in the file name


            {panel}
            (i) This bug report has been updated to better reflect the issue. Below is the old bug report description

            The new multimedia macro will not find attached swf (flash) files if the filename has a ' in it.
            We have files already embedded using the \!filename.swf\! notation and they work fine (autoplay and all) but when I changed them to use the new \{multimedia\} notation there was an error message: "multimedia: Cannot find attachment 'ninja's.swf'"

            I've attached two files - the test swf file from the [confluence documentation page |http://confluence.atlassian.com/x/WTcC] with and without an apostrophe ' character in the filename so you can test it.
            {panel}
            Damien Tan made changes -
            Attachment New: error message 2.png [ 399346 ]
            Damien Tan made changes -
            Attachment New: error message 1.png [ 399345 ]

              Unassigned Unassigned
              4ad8410aecce Diane Sexton
              Affected customers:
              3 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated: