Kat Marchán 🐈 on Nostr: OK kind of security question… if I’m loading HTML from an AJAX request (mostly ...
OK kind of security question… if I’m loading HTML from an AJAX request (mostly trusted, full my own server), and I want to safely put that on my web page, what’s the “right” way to do that? Make a div and assign the response to .innerHTML? Is there something “safer”?
Published at
2024-09-06 16:34:40Event JSON
{
"id": "88efe57a615e76dc36028c0702cfed88ea460dff468acf342f80f6f773cfc92b",
"pubkey": "c16513f69222765ba5a48fedf0d34792dad255108a40e8d9f50d6be66b5a5114",
"created_at": 1725640480,
"kind": 1,
"tags": [
[
"proxy",
"https://toot.cat/users/zkat/statuses/113091574557476247",
"activitypub"
]
],
"content": "OK kind of security question… if I’m loading HTML from an AJAX request (mostly trusted, full my own server), and I want to safely put that on my web page, what’s the “right” way to do that? Make a div and assign the response to .innerHTML? Is there something “safer”?",
"sig": "2f13d3b21374899ca6134e199edce318c925b178ba7e28548a10dfb7b7706b910e1cbf25a954aab14fadc2636df9ba2391dc8524754ef1c45ff988694beb6237"
}