{"id":47607,"date":"2026-10-12T22:29:12","date_gmt":"2026-10-12T13:29:12","guid":{"rendered":"https:\/\/jore2.com\/?p=47607"},"modified":"2026-10-12T22:29:12","modified_gmt":"2026-10-12T13:29:12","slug":"tips-21642-type-safe-html-templating-in-zig","status":"publish","type":"post","link":"https:\/\/jore2.com\/?p=47607","title":{"rendered":"Zig \uc5b8\uc5b4 \uae30\ubc18 \ud0c0\uc785 \uc548\uc804 HTML \ud15c\ud50c\ub9bf \ub77c\uc774\ube0c\ub7ec\ub9ac zt \uacf5\uac1c"},"content":{"rendered":"<div class=\"jore2-editor-byline\">\n<p><strong>\uc774\uac00\uc740<\/strong><\/p>\n<\/div>\n<p>Luk\u00e1\u0161 Lalinsk\u00fd\uac00 Zig \uc5b8\uc5b4 \uc0dd\ud0dc\uacc4\ub97c \uc704\ud55c \uc0c8\ub85c\uc6b4 HTML \ud15c\ud50c\ub9bf \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 zt\ub97c \uacf5\uac1c\ud588\ub2e4. \uadf8\ub294 \uc9c0\ub09c 2000\ub144\ub300 \ucd08\ubd80\ud130 PHP\uc640 Perl \ub4f1 \ub2e4\uc591\ud55c \uc6f9 \uac1c\ubc1c \ud658\uacbd\uc744 \uacbd\ud5d8\ud55c \ubca0\ud14c\ub791 \uac1c\ubc1c\uc790\ub2e4. \ucd5c\uadfc \uba87 \ub144\uac04 Zig \uc5b8\uc5b4\ub85c API \ubc31\uc5d4\ub4dc\ub97c \uad6c\ucd95\ud558\ub358 \uc911 \uc800\uc218\uc900 \uc5b8\uc5b4\uc5d0\uc11c\ub3c4 \uc6f9 \uac1c\ubc1c\uc774 \uac00\ub2a5\ud558\ub2e4\ub294 \uc810\uc744 \ud655\uc778\ud558\uace0 \uc774\ub97c \uad6c\uccb4\ud654\ud588\ub2e4.<\/p>\n<p>zt\ub294 Go \uc5b8\uc5b4\uc758 Templ \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \ubaa8\ub378\ub85c \uc0bc\uc544 \uc124\uacc4\ub410\ub2e4. \uac00\uc7a5 \ud070 \ud2b9\uc9d5\uc740 \ucef4\ud30c\uc77c \ud0c0\uc784\uc5d0 \ubaa8\ub4e0 \uc785\ub825\uac12\uc758 \ud0c0\uc785\uc744 \uc5c4\uaca9\ud558\uac8c \uac80\uc0ac\ud55c\ub2e4\ub294 \uc810\uc774\ub2e4. \ub7f0\ud0c0\uc784 \uc624\ub958\ub97c \uc904\uc774\uae30 \uc704\ud574 \ub3d9\uc801 \uc5b8\uc5b4\uc5d0\uc11c\uc758 \ubd88\ud3b8\ud568\uc744 \uc81c\uac70\ud558\ub824\ub294 \uc758\ub3c4\uac00 \ub2f4\uacbc\ub2e4.<\/p>\n<p>\ud15c\ud50c\ub9bf \ucf54\ub4dc\ub294 \ube4c\ub4dc \uc2dc\uc810\uc5d0 Zig \ucf54\ub4dc\ub85c \ubcc0\ud658\ub41c\ub2e4. \ub530\ub77c\uc11c \uc624\ud0c0\ub098 \uc798\ubabb\ub41c \ubcc0\uc218 \ucc38\uc870\ub294 \uc77c\ubc18\uc801\uc778 Zig \ucef4\ud30c\uc77c\ub7ec \uc624\ub958\ub85c \uc989\uc2dc \ub4dc\ub7ec\ub09c\ub2e4.<\/p>\n<p>\uc131\ub2a5 \uce21\uba74\uc5d0\uc11c\ub294 \uba54\ubaa8\ub9ac \ud560\ub2f9\uc744 \ucd5c\uc18c\ud654\ud558\ub294 \ubc29\uc2dd\uc744 \ucc44\ud0dd\ud588\ub2e4. \uc911\uac04 \uc0c1\ud0dc\ub97c \uac70\uce58\uc9c0 \uc54a\uace0 std.Io.Writer\ub85c \uc9c1\uc811 \ucd9c\ub825\uc744 \uc4f4\ub2e4. \uc774\ub294 Zig\uc758 \uc544\ub808\ub098 \ud560\ub2f9\uc790 \ud2b9\uc131\uc744 \ud65c\uc6a9\ud574 \ubb38\uc790\uc5f4 \ucc98\ub9ac \ubd80\ub2f4\uc744 \ub0ae\ucd94\uae30 \uc704\ud568\uc774\ub2e4.<\/p>\n<p>\ubcf4\uc548 \uba74\uc5d0\uc11c\ub294 \uae30\ubcf8 \uc124\uc815\uc73c\ub85c \ubaa8\ub4e0 \uc785\ub825\uac12\uc774 HTML \uc774\uc2a4\ucf00\uc774\ud504 \ucc98\ub9ac\ub41c\ub2e4. XSS \uacf5\uaca9 \uc704\ud5d8\uc744 \uc6d0\ucc9c \ucc28\ub2e8\ud558\uae30 \uc704\ud55c \uc7a5\uce58\ub2e4.<\/p>\n<p>raw HTML \ucd9c\ub825\uc774 \ud544\uc694\ud55c \uacbd\uc6b0\uc5d0\ub9cc {!value} \ubb38\ubc95\uc73c\ub85c \uba85\uc2dc\uc801\uc73c\ub85c \ud5c8\uc6a9\ud574\uc57c \ud55c\ub2e4. href\ub098 src \uac19\uc740 URL \uc18d\uc131\uc740 \uc704\ud5d8\ud55c \uc2a4\ud0b4 \uc0ac\uc6a9\uc744 \uc810\uac80\ud55c\ub2e4. \ud0dc\uadf8 \ub2eb\ud798 \uc5ec\ubd80\ub3c4 \ud30c\uc11c \ub2e8\uacc4\uc5d0\uc11c \uac15\uc81c\ud55c\ub2e4.<\/p>\n<p>\uc774\ub7ec\ud55c \uc81c\uc57d \uc870\uac74\ub4e4\uc740 \ub9c8\ud06c\uc5c5 \uc190\uc0c1\uc744 \ubc29\uc9c0\ud558\uace0 \uc548\uc804\ud55c \ub80c\ub354\ub9c1\uc744 \ubcf4\uc7a5\ud55c\ub2e4.<\/p>\n<p>\ucee4\ubba4\ub2c8\ud2f0 \ubc18\uc751\uc740 Rust\uc758 rsx \ub9e4\ud06c\ub85c\ub098 Kotlin\uc758 kotlinx.html \ub4f1 \ub2e4\ub978 \uc5b8\uc5b4\uc758 \uc720\uc0ac \uc811\uadfc\ubc95\uacfc\uc758 \ube44\uad50\ub85c \uc774\uc5b4\uc84c\ub2e4. \uc77c\ubd80 \uc0ac\uc6a9\uc790\ub294 \ub514\ubc84\uae45 \ud3b8\uc758\uc131\uc744 \uc704\ud574 \uc2e4\uc81c \ucf54\ub4dc \ub0b4\uc5d0\uc11c \ud15c\ud50c\ub9bf\uc744 \uc791\uc131\ud558\ub294 DSL \ubc29\uc2dd\ub3c4 \uc120\ud638\ud55c\ub2e4\uace0 \ubc1d\ud614\ub2e4. \ud558\uc9c0\ub9cc zt\ub294 HTML\uacfc \uc720\uc0ac\ud55c \uad6c\ubb38\uc744 \uc720\uc9c0\ud558\uba74\uc11c\ub3c4 \ud0c0\uc785 \uc548\uc804\uc131\uc744 \ud655\ubcf4\ud558\ub294 \uc808\ucda9\uc548\uc744 \uc81c\uc2dc\ud588\ub2e4.<\/p>\n<p>\ud604\uc7ac \ud504\ub85c\uc81d\ud2b8\ub294 \ucd08\uae30 \ub2e8\uacc4\uc774\uba70 GitHub\uc640 Discord\ub97c \ud1b5\ud574 \ud53c\ub4dc\ubc31\uc744 \ubc1b\uace0 \uc788\ub2e4. @if, @for, @switch \uac19\uc740 \uc81c\uc5b4\ubb38 \uc811\ub450\uc0ac \uc694\uad6c \uc5ec\ubd80\uc5d0 \ub300\ud55c \ub514\uc790\uc778 \ub17c\uc758\uac00 \ub0a8\uc544 \uc788\ub2e4. \uc21c\uc218 \ud14d\uc2a4\ud2b8\uc640\uc758 \ud30c\uc2f1 \ubaa8\ud638\uc131\uc744 \ud574\uacb0\ud558\uae30 \uc704\ud55c \uace0\ubbfc\uc774\ub2e4.<\/p>\n<p>\uc774\ubbf8 \uc18c\uc218\uc758 \uc0ac\uc6a9\uc790\uac00 \ud65c\uc6a9 \uc911\uc774\uc9c0\ub9cc \uad11\ubc94\uc704\ud55c \ub3c4\uc785 \uc0ac\ub840\ub294 \uc544\uc9c1 \ubcf4\uace0\ub418\uc9c0 \uc54a\uc558\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uac1c\ubc1c\uc790 Luk\u00e1\u0161 Lalinsk\u00fd\uac00 Zig \uc5b8\uc5b4\uc6a9 \ud0c0\uc785 \uc548\uc804 HTML \ud15c\ud50c\ub9bf \ub77c\uc774\ube0c\ub7ec\ub9ac &#8216;zt&#8217;\ub97c \uacf5\uac1c\ud588\uc2b5\ub2c8\ub2e4. \ucef4\ud30c\uc77c \ud0c0\uc784 \uac80\uc99d\uacfc \uc790\ub3d9 \uc774\uc2a4\ucf00\uc774\ud504 \uae30\ub2a5\uc744 \uac16\ucd98 \uc774 \ub3c4\uad6c\ub294 Go\uc758 Templ\uc744 \ucc38\uace0\ud574 \uc124\uacc4\ub418\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n","protected":false},"author":4,"featured_media":47606,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jore2_quality_policy":"people-first-v2","footnotes":""},"categories":[387],"tags":[15729,10251,210,31380,31379],"class_list":["post-47607","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-it","tag-html","tag-zig","tag-210","tag-31380","tag-31379"],"featured_image_urls":{"full":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x.png",2400,1260,false],"thumbnail":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x-150x150.png",150,150,true],"medium":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x-300x158.png",300,158,true],"medium_large":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x-768x403.png",640,336,true],"large":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x-1024x538.png",640,336,true],"1536x1536":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x-1536x806.png",1536,806,true],"2048x2048":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x-2048x1075.png",2048,1075,true],"morenews-large":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x-825x575.png",825,575,true],"morenews-medium":["https:\/\/jore2.com\/wp-content\/uploads\/2026\/10\/tvaaw4u2x-590x410.png",590,410,true]},"author_info":{"info":["\uc774\uac00\uc740"]},"category_info":"<a href=\"https:\/\/jore2.com\/?cat=387\" rel=\"category\">IT&amp;\uc0dd\ud65c\uafc0\ud301<\/a>","tag_info":"IT&amp;\uc0dd\ud65c\uafc0\ud301","comment_count":"0","_links":{"self":[{"href":"https:\/\/jore2.com\/index.php?rest_route=\/wp\/v2\/posts\/47607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jore2.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jore2.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jore2.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/jore2.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47607"}],"version-history":[{"count":0,"href":"https:\/\/jore2.com\/index.php?rest_route=\/wp\/v2\/posts\/47607\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jore2.com\/index.php?rest_route=\/wp\/v2\/media\/47606"}],"wp:attachment":[{"href":"https:\/\/jore2.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jore2.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jore2.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}