# Bug OP-13668 - PDF Export not using default export filename sanitation

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-13668

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 13.1.0 |
| Observed in versions |  |
| Sprint | 13.1.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  PDF Export a query or a single work package with an apostrophe in the name of the work package, project or query

### What is the buggy behavior?

  - In the filename of the download apostrophes are escaped to `&#39;`   
    e.g. `Demo_Phase_#2_WorkPackage-mit&#39;Apostroph-_2023-11-08_11-17.pdf`

### What is the expected behavior?

1.  PDF Export should use the filename sanitation of the other exporters (e.g. CSV), which is removing characters that may cause problems  
    see <https://github.com/opf/openproject/blob/c367c26b6b539bd60c6bca2aa696530b72c189ab/app/models/exports/exporter.rb#L51 >  
    e.g. `Demo_Phase_2_WorkPackage-mit_Apostroph-_2023-11-08_11-39.pdf`
