feat: add escape tagged function to escape html#112
feat: add escape tagged function to escape html#112arthurfiorette merged 3 commits intokitajs:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #112 +/- ##
==========================================
+ Coverage 98.71% 98.74% +0.02%
==========================================
Files 4 4
Lines 1009 1032 +23
==========================================
+ Hits 996 1019 +23
Misses 13 13 ☔ View full report in Codecov by Sentry. |
|
Hey @JacopoPatroclo awesome idea! Yes I'd love if you could add support for it in the ts plugin! I'll change the implementation to follow this package's code standards and also export an alias called import { Html, e } from '@kitajs/html';
html = <div>{e`...`}</div> |
|
@JacopoPatroclo what do you think? |
I do not like such an extreme shortening, makes the code more obscure. But of course, this is my opinion and this is not my project 🤓 |
It would be nice to have a tag function to escape unsafe inputs.
It improves readability in cases like this.
instead of:
Let me know if it makes sense and if you like the implementation.
If you agree I will also make a PR to support this new way of escaping in the ts plugin