Comments (6)
Ok I found that we have to add one more curly braces pair to escape specials char :D
Mail subject should be : "Welcome to {{{name}}}"
https://handlebarsjs.com/#html-escaping
from extensions.
@rphlmr Thanks for the feedback. Looks like you're right yeah, the triple-stash should work in this case.
I'll get a PR sent up soon with the changes (unless you wanted to take a go?).
from extensions.
Actually, I was thinking we could set this in the template compiler, however re-reading what you said I think this is a documentation update.
Maybe in the docs we could add a line below the example:
By default, the extension HTML-escapes values returned by a `{{expression}}`. If you don't want to escape a value, use the "triple-stash", `{{{`.
Taken from: https://handlebarsjs.com/#html-escaping
from extensions.
Yes, I think it should be only on the documentation.
It's easier to put it in the template compiler (and transparent for fast doc readers), but if someone wants to escape, it'll no more be configurable.
Last question, do you know why it works without triple-stash in the template body ? (actually it seems that we have 2 diffents behaviours :p )
from extensions.
-
It'd be great to learn the answer to the question from @rphlmr above.
-
A clarification question - this HTML-escaping syntax is only applicable for templates, right?
-
If (2) is true... Since the HTML-escaping syntax is already documented in the handlebar template documentation, I'd prefer to not repeat it in our docs. It seems pretty easy to find in their docs with a quick ctrl-f of their page. If we document this syntax in our docs, then we'd be going down the road of documenting all their syntax.
from extensions.
- It'd be great to learn the answer to the question from @rphlmr above.
So the reason the subject & body have different functionality is how the email client is handling the data. Your body content will be getting escaped by handlebars, but your email client will be then parsing the HTML entities back into valid HTML (as HTML is allowed in the body).
In the subject, only a string is allowed, so it displays the escaped output handlebars generated.
- A clarification question - this HTML-escaping syntax is only applicable for templates, right?
Yep, it's applied to the subject, html/text/amp properties sent on each email.
- If (2) is true... Since the HTML-escaping syntax is already documented in the handlebar template documentation, I'd prefer to not repeat it in our docs. It seems pretty easy to find in their docs with a quick ctrl-f of their page. If we document this syntax in our docs, then we'd be going down the road of documenting all their syntax.
Makes sense, I'll go ahead and close this issue along with the PR.
from extensions.
Related Issues (20)
- 🐛 [firestore-bigquery-export] multi-db selection isn't working for Firestore triggers HOT 1
- time partition not working for firebase extension(0.1.49) HOT 4
- 🐛 [Stream Firestore to BigQuery] fs-bq-import-collection doesn't recognize partitioned field HOT 1
- 🐛 [Stream-Firestore-BigQuery] Import existing Firestore documents into BigQuery HOT 2
- 🐛 [firestore-send-email] Email status SUCCESS but not delivered
- [firestore-translate-text] Source text is translated from Latin and not English HOT 2
- firefox
- [firestore-send-email] Email templates stopped working yesterday. HOT 2
- 🐛 [Vector Search with Firestore] Error creating firestore Vector index. backfillTrigger() fail HOT 25
- 🐛 [firestore-vector-search] model: 'text-multilingual-embedding-002' HOT 1
- 🐛 Stream Firestore to BigQuery - disable changelog HOT 1
- 🐛 [storage-resize-images] Extension crops the image with default settings. HOT 2
- 🐛 [storage-resize-images] Console error when trying to use the extension HOT 1
- 🐛 [firestore-translate-text] Error on updating Extension
- 🐛 [EXTENSION_NAME_HERE] allow schedule email
- 🐛 [firestore-translate-text] can not translate array field HOT 1
- 🐛 [firestore-bigquery-export] Task size too large errors occuring even with EXCLUDE_OLD_DATA set to yes/true HOT 2
- 🐛 [firestore-bigquery-export] Unhandled error PartialFailureError HOT 2
- [firestore-send-email] Only works on (default) database HOT 1
- 🐛 [firestore-bigquery-export] Explicitly target the firebase functions API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extensions.