Skip to content

Commit

Permalink
improve html escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
Loris Cro authored and Loris Cro committed Sep 29, 2024
1 parent e6a82d1 commit 4bcd494
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub const HtmlSafe = struct {
_ = fmt;
for (self.bytes) |b| {
switch (b) {
'&' => try out_stream.writeAll("&"),
'>' => try out_stream.writeAll(">"),
'<' => try out_stream.writeAll("&lt;"),
'\'' => try out_stream.writeAll("&apos;"),
Expand Down

0 comments on commit 4bcd494

Please sign in to comment.