Add escaping of dynamic content
This commit is contained in:
+2
-2
@@ -55,10 +55,10 @@ let main =
|
||||
|
||||
<div class="item">
|
||||
<div>
|
||||
<a href=\'"'\link\'"'>\post.title</a>
|
||||
<a href=\'"'\link\'"'>\escape(post.title)</a>
|
||||
</div>
|
||||
<div>
|
||||
<span>\post.date</span> | <span>\post.num_comments comments</span>
|
||||
<span>\escape(post.date)</span> | <span>\escape(post.num_comments) comments</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ procedure page(title, login_user_id, style, main)
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>CN - \title</title>
|
||||
<title>CN - \escape(title)</title>
|
||||
<style>
|
||||
body {
|
||||
line-height: 200%;
|
||||
|
||||
Reference in New Issue
Block a user