Skip to content

Fix PDF cleanName to avoid leading slash

bgm requested to merge bgm/cdntaxreceipts:cleanName into master

After donating online, the receipt sent has the name /Receipt-Web-xx.pdf. Most emails clients ignore the leading slash so it's not really a problem, but it's a bit odd.

Before:

Content-Type: application/pdf;
name="/Receipt-Web-00000036.pdf"
Content-Disposition: attachment;
filename="/Receipt-Web-00000036.pdf";

After:

Content-Type: application/pdf;
name=Receipt-Web-00000038.pdf
Content-Disposition: attachment;
filename=Receipt-Web-00000038.pdf;

Merge request reports