4 ms·
Some dangers with injection attacks if you don't santitize inputs correctly, but this is probably faster than most templating languages like razor.
by naasking 1y ago
Some dangers with injection attacks if you don't santitize inputs correctly, but this is probably faster than most templating languages like razor.
- Xss3 1y agoIt's super easy to add sanitization middleware in .NET.
- bob1029 1y agoThere are a lot of ways to manage this problem. My preferred path is to wrap interpolated fields with HttpUtility.UrlEncode() when I know a user can touch it and there are plausible reasons for allowing 'illegal' characters at form submit time. In terms of performance, it is definitely faster. The amount of time it takes to render these partials is negligible. You'd have to switch up your tooling to measure things in microseconds instead of milliseconds if you wanted any meaningful signal.
- naasking 1y agoThe only thing that would be comparable might be something like RazorSlices.