aboutsummaryrefslogtreecommitdiff
path: root/src/eval/html/Void.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-27 20:49:13 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-27 20:49:13 +0200
commite154408e8ddeaee83242002f4c7af68b29d3a677 (patch)
treed0caadc01e77aa15edb204b1529fac168775329a /src/eval/html/Void.zig
parent3b0e9424a66058da82d11d432da886ec7b6ce7eb (diff)
feat(): support callout
Diffstat (limited to 'src/eval/html/Void.zig')
-rw-r--r--src/eval/html/Void.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval/html/Void.zig b/src/eval/html/Void.zig
index 58550f4..ec35fc7 100644
--- a/src/eval/html/Void.zig
+++ b/src/eval/html/Void.zig
@@ -28,7 +28,7 @@ pub fn element(self: *Self) Element {
}
pub fn setAttribute(self: *Self, k: []const u8, v: []const u8) Error!void {
- try self.attributes.put(try self.alloc.dupe(u8, k), try self.alloc.dupe(u8, v));
+ try self.attributes.put(try self.alloc.dupe(u8, k), try html.escape(self.alloc, v));
}
pub fn removeAttribute(self: *Self, k: []const u8) void {
@@ -40,7 +40,7 @@ pub fn hasAttribute(self: *Self, k: []const u8) bool {
}
pub fn appendClass(self: *Self, v: []const u8) Error!void {
- try self.class_list.insert(v);
+ try self.class_list.insert(try html.escape(self.alloc, v));
}
pub fn hasClass(self: *Self, v: []const u8) bool {