Confluence Cloud HTML Export - Broken Internal Links for Pages with Commas

XMLWordPrintable

    • Minor

      Issue Summary

      When exporting a Confluence space to HTML, pages containing commas in their titles result in broken internal links. The exporter correctly encodes the comma as %2C in the HTML href attributes, but the browsers require the ‘%' in the ‘file://…’ URL to be double encoded (e.g. the ‘%252C’) within HTML files.

      Steps to Reproduce

      1. Create a Confluence page with a comma in the title (e.g., Project Status, September).
      2. Create a second page that contains a link to the first page.
      3. Navigate to Space Settings > Export Space and select HTML.
      4. Download and unzip the resulting export.
      5. Open the index.html or the second page in a browser.
      6. Click the link to the Project Status, September page.

      Expected Results

      The link should open the corresponding HTML file.

      Actual Results

      The browser displays a "File Not Found" (404) error.

      Workaround

      Users must manually rename the files in the export folder within .html files.

      macOS

      find . -name "*.html" -exec sed -i '' 's/%2C/%252C/g' {} +

      Windows PowerShell

      Get-ChildItem -Filter "*.html" -Recurse | ForEach-Object {
          (Get-Content $_.FullName) -replace '%2C', '%252C' | Set-Content $_.FullName
      } 

              Assignee:
              Unassigned
              Reporter:
              Amin A.
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: