I assume someone's already done this but Rust would be perfect for doing a typesafe template lang
-
Show this thread
-
Replying to @mountain_ghosts
I think maud might do this, but what I've really wanted is one where escaping and XSS-prevention can be done contextually (e.g. you are forced to use sanitized string types, based on the use site).
2 replies 0 retweets 0 likes -
Replying to @ManishEarth @mountain_ghosts
I think this is what you're suggesting, but I'm not sure. This kind of template system where you're forced to use SafeUrl (non-javascript) for <a href=$> and SafeString for <div>$</div> would be quite powerful
2 replies 0 retweets 0 likes
Replying to @ManishEarth @mountain_ghosts
Galaxy brain version is to represent your app's router as types, and only accept those instead of an escaped string
1:07 PM - 21 May 2019
0 replies
0 retweets
5 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.