Problem/Motivation
The metadata appender is enabled and using entity reference to get the title from the node to add as metadata to the pdf document attached. Unfortunately our title includes slashes and after the metadata is added it is stripped from the metadata.
Steps to reproduce
For a node with the metadata appender enabled, have a title that includes slashes like 3/4/5 and save, it will save as 345 instead.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | pdf_metadata-preserve_special_characters-3537885.patch | 1.43 KB | j-barnes |
Issue fork pdf_metadata-3537885
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
j-barnes commentedComment #3
j-barnes commentedNice catch, it looks like we are stripping out way too many characters when we don't need to. Instead of trying to remove the "unsafe" characters I think it's best to just escape the few that PostScript actually cares about. I'll add a merge request to fix this.
Comment #4
j-barnes commentedComment #6
j-barnes commented@sunny-lee - If you could take a look, this should now preserve characters.
Comment #7
j-barnes commentedComment #8
sunny-lee commentedLooks good! Tried with various content types and it works! Previously ids would have the slashes and ampersands stripped out but this fix works and after resave, fixes the issue.
Comment #10
j-barnes commentedThanks for testing!
Comment #11
j-barnes commented