Localize alias #193
-
Hello @alexandercerutti and first of all thanks for this project, I'm using it since a few years ago and always worked like a charm. Here is an example of what I'm doing: pkPass.backFields.push({ key: "rewards", label: "rewards.label", value: `<a href="${customerProfileUrl}">Link</a>` }); Any idea how can I achieve that? Thanks in advance and thanks for the project! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
Hi @cuni0716, thanks for having used passkit-generator for such long time ❤️ First of all, HTML is valid only when using Second thing, I never tried to associate As I never tried you use case, I cannot ensure Let me know if this works. I'm very curious about your use case! |
Beta Was this translation helpful? Give feedback.
Hey there, @cuni0716, I tried to give a look and I successfully obtained what we talked about.
Look at this:
trim.75526A3B-F8EF-4EC9-B5D0-14CF64C8701C.MOV
The issue is that the html quotes must be escaped, as the pass format requires string to be surrounded by double quotes. Something like this must appear in the final file:
I don't know if, in both cases, single quotes work.
I'm not sure if there's anything that should be fixed in
passkit-generator
, but in your code you just need to double-escape the double quotes, like\\"
, as the first will be interpreted by JS I guess.A…