After more testing, the error I get is comiing from E2PDF plugin after the output from the sanitize=1 using the e2PDF save shortcode

Formidable Forms
3 December, 2020 11:05:29
chsfletch
Topics: 2
Messages: 7
Sorry to write back again. After a lot more testing with WP, formidable forms pro, and E2PDF plugin, I have more information to share.

When I use sanitize=1 parameter in the email notifications portion of formidable forms. The message crafted looks like this:

Actual message:
You have received a form from [4998 sanitize=1] [4997 sanitize=1]
<br>
The form file has been saved to the forms directory in your share.

[e2pdf-save id="1" flatten="1" name="[4998 sanitize=1]_[4997 sanitize=1]" create_dir="true" dir="/Outreach/JohnProcessedForms/CHS_AUTH_[5030]_[4998 sanitize=1]_[4997 sanitize=1]" create_htaccess="false" overwrite="true" download="true"]

The email shows the greek characters correctly, SO it must be UTF-8 coming from the sanitize routine.
Direct from email: You have received a form from μεγάλη διεθνή ετήσια σύνοδος

But all the directories com up like this:
CHS_AUTH_160_%ce%bc%ce%b5%ce%b3%ce%ac%ce%bb%ce%b7-%ce%b4%ce%b9%ce%b5%ce%b8%ce%bd%ce%ae_%ce%93%ce%b3%cf%85%cf%82-%ce%9e%cf%89%ce%b2%ce%be%ce%bd%ce%ac%ce%ac (made by E2PDF)

files look like this:
%ce%bc%ce%b5%ce%b3%ce%ac%ce%bb%ce%b7-%ce%b4%ce%b9%ce%b5%ce%b8%ce%bd%ce%ae_%ce%93%ce%b3%cf%85%cf%82-%ce%9e%cf%89%ce%b2%ce%be%ce%bd%ce%ac%ce%ac_BestLOI.pdf (made by pdftk using dir name above)

%ce%bc%ce%b5%ce%b3%ce%ac%ce%bb%ce%b7-%ce%b4%ce%b9%ce%b5%ce%b8%ce%bd%ce%ae_%ce%93%ce%b3%cf%85%cf%82-%ce%9e%cf%89%ce%b2%ce%be%ce%bd%ce%ac%ce%ac_CrazyCV.pdf (made by pdftk using dir name above)

%ce%bc%ce%b5%ce%b3%ce%ac%ce%bb%ce%b7-%ce%b4%ce%b9%ce%b5%ce%b8%ce%bd%ce%ae_%ce%93%ce%b3%cf%85%cf%82-%ce%9e%cf%89%ce%b2%ce%be%ce%bd%ce%ac%ce%ac_MyRP.pdf (made by pdftk using dir name above)

%ce%bc%ce%b5%ce%b3%ce%ac%ce%bb%ce%b7-%ce%b4%ce%b9%ce%b5%ce%b8%ce%bd%ce%ae_%ce%93%ce%b3%cf%85%cf%82-%ce%9e%cf%89%ce%b2%ce%be%ce%bd%ce%ac%ce%ac.pdf (made by E2PDF)
index.php (made by E2PDF)
merged_%ce%bc%ce%b5%ce%b3%ce%ac%ce%bb%ce%b7-%ce%b4%ce%b9%ce%b5%ce%b8%ce%bd%ce%ae_%ce%93%ce%b3%cf%85%cf%82-%ce%9e%cf%89%ce%b2%ce%be%ce%bd%ce%ac%ce%ac.pdf (made by pdftk using dir name above)
Submitted.txt (made by my script)

Now, the working one, but can't use 2 surnames or 2 given names

Actual message:
You have received a form from [4998] [4997]
<br>
The form file has been saved to the forms directory in your share.

[e2pdf-save id="1" flatten="1" name="[4998]_[4997]" create_dir="true" dir="/Outreach/JohnProcessedForms/CHS_AUTH_[5030]_[4998]_[4997]" create_htaccess="false" overwrite="true" download="true"]

Direct from email: You have received a form from Γγυς Ξωβξνάά

Correct file and directory
./CHS_AUTH_160_Ξωβξνάά_Γγυς:
index.php (made by E2PDF)
merged_Ξωβξνάά_Γγυς.pdf (made by pdftk)
Submitted.txt (made by cron script with create date of index.php)
Ξωβξνάά_Γγυς_BestLOI.pdf (made by pdftk using dir name above)
Ξωβξνάά_Γγυς_CrazyCV.pdf (made by pdftk using dir name above)
Ξωβξνάά_Γγυς_MyRP.pdf (made by pdftk using dir name above)
Ξωβξνάά_Γγυς.pdf (made by E2PDF)

I am not sure why the handoff failed from the formidable forms field parameter sanitize=1, but it is what is breaking E2PDF. It looks like all processes see UTF-8. I am at your disposal to troubleshoot.

The files involved are your plugin
path to WP-content/plugins/formidable-pro/classes/models/FrmProContent.php: return sanitize_title_with_dashes( $replace_with );
path to WP-includes/formatting function sanitize_title_with_dashes($title, $raw_title, $context)

I have tested by adding a unique $context parameter 'form' those are the exact functions. default $context = 'display'I and I found a 'save' in the function. I cannot find the reason why sanitize_title_with_dashes() makes E2PDF write the directory and first PDF with the %XX hex which are correct for the greek characters, but it shows placeholders.

4 December, 2020 03:08:22
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Thank you for sharing details, we appreciate any reports of E2Pdf bugs/improvements suggestions, however when we tried to replicate "sanitize=1" shortcode directly in email, we got different results with and without "sanitize" attribute.

Screenshots attached:
1. Example form created
2. Mail message
3. Data with which we tested
4. Result email (As you can see "sanitize" values encoded)
5. Folder structure created

Any reason why you can't use last working solution with 2 surnames or 2 given names?

P.S. Are you using any Formidable Forms API addons connected to current form? or any 3rd party mail plugins?

We remain at your service.
We would really appreciate your feedback at WordPress.org!
4 December, 2020 08:35:21
chsfletch
Topics: 2
Messages: 7
It looks like you got the same results You need to use sanitize in the e2pdf save shortcode. I can't use spaces in the directory or file name. which is what the sanitize=1 param is supposed to use. it makes a single quote enclosed directory with spaces.
4 December, 2020 09:29:29
E2Pdf
Support
Topics: 7
Messages: 3163
This is its default behavior which is used by Formidable Forms, "sanitize=1" encodes UTF-8 non-US characters. Unfortunately we can't affect it anyhow and E2Pdf uses it as value.

You must use the solution which was posted in last message in previous topic by updating plugin to RC version 1.13.16, adding function to child theme functions.php or php snippet which will replace spaces with "-" in "name" and "dir" without using "sanitize=1" attribute. If you need to make it lowercase you can just wrap values after preg_replace with "mb_strtolower" php function.

https://e2pdf.com/support/desk/e2pdf-sanitize-shortcode-ruins-greek-names

We remain at your service.
We would really appreciate your feedback at WordPress.org!
9 December, 2020 12:11:49
chsfletch
Topics: 2
Messages: 7
Hi,

1.13.19

Release Date – 09 December 2020

Add: Additional filters to hook “shortcode” attributes

Does this include the "e2pdf_model_shortcode_e2pdf_save_atts" that was made for our solution? I turned off auto-updates
9 December, 2020 21:43:17
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Yes, it's included and it must not be any issues after update.

We remain at your service.
We would really appreciate your feedback at WordPress.org!