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)
- [Translate Text in Firestore] Translating field with an array of strings does not work on add document but on update. HOT 4
- π [fs-bq-import-collection] Documents Aren't Passing Between Projects
- 0ef0b1053b46b317dcf367cd007aedfb075b856f
- beta δ½δΈδΊΊθΏ· txt
- π firestore-bigquery-export Unhandled error ApiError: Cannot parse response as JSON: HOT 1
- π [Stream Firestore to BigQuery] Update cloud function extension to gen 2 HOT 3
- [*] Improve regex validation across extensions
- π [firestore-send-email] From september OAuth will be required in the Google Workspace
- π [storage-resize-images] Override sharp output parameters with customized image metadata
- MacroDroid Log HOT 1
- [firestore-bigquery-export]: Wrong value in description for maximum dispatches per second.
- π [firestore-bigquery-export] schema-views script doesn't work against multiple schema files
- Typo in `README.md` for `storage-resize-images` extension
- π [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 to BigQuery] Need to disable or enable delete history streaming
- π [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
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.