aboutsummaryrefslogtreecommitdiff
path: root/test/lustre_test.gleam
diff options
context:
space:
mode:
authorbgw <29340584+bgwdotdev@users.noreply.github.com>2024-04-25 19:19:15 +0100
committerGitHub <noreply@github.com>2024-04-25 19:19:15 +0100
commit93aeeb7a6316389f3bd4bbdb7a9ffc555677e719 (patch)
tree70d2443bf31090a320c56b1029d99c0c4bb05dd6 /test/lustre_test.gleam
parent06b75022eed1e8bbed13a85cc8aeb18199040392 (diff)
downloadlustre-93aeeb7a6316389f3bd4bbdb7a9ffc555677e719.tar.gz
lustre-93aeeb7a6316389f3bd4bbdb7a9ffc555677e719.zip
🔀 Escape attribute values when emitting static HTML. (#113)
* fix: add the escape function over custom attribute values * fix: update class and style attribute values to be escaped
Diffstat (limited to 'test/lustre_test.gleam')
-rw-r--r--test/lustre_test.gleam6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lustre_test.gleam b/test/lustre_test.gleam
index f3a2993..6cd93c3 100644
--- a/test/lustre_test.gleam
+++ b/test/lustre_test.gleam
@@ -149,3 +149,9 @@ pub fn fragment_counter_diff_test() {
birdie.snap(json.to_string(patch.element_diff_to_json(diff)), title)
process.send(runtime, Shutdown)
}
+
+pub fn escaped_attribute_test() {
+ let title = "Can safely escape dangerous symbols in attributes"
+ let el = static.escaped_attribute()
+ birdie.snap(element.to_string(el), title)
+}