HtmlForgeX v0.24 Release Notes
We've just released HtmlForgeX v0.24 with important improvements to the DataTables component and HTML encoding behavior.
Key Changes
TableCell and Element Support in DataTables
DataTables now properly support TableCell and Element cell values with encoding. Previously, if you passed a rich TableCell or a custom Element as a cell value, the encoding behavior could strip or mangle the content. This is now handled correctly.
Default HTML Encoding for Plain Values
Plain table values are now HTML-encoded by default. This prevents XSS vulnerabilities when displaying user-provided data in tables. If you need to render raw HTML in a cell, use the TableCell wrapper with explicit raw mode.
// Plain strings are now auto-encoded (safe by default)
page.Table(data, table => {
table.EnableSearch().EnablePaging();
});
// Use TableCell for explicit control
page.Table(data, table => {
table.Column("Status", row =>
new TableCell(row.StatusHtml, encode: false));
});Bug Fixes
- Fixed edge case where
Elementcell values could produce double-encoded output - Improved encoding consistency across Bootstrap, Tabler, and DataTables table types
Upgrade
dotnet add package HtmlForgeX --version 0.24.0