@@ -26,14 +26,14 @@ const appendApiResponse = function (apiResponse, el) {
26
26
27
27
// Add success message to UI
28
28
const newParagraphSuccessMsg = document . createElement ( "p" )
29
- newParagraphSuccessMsg . innerHTML = "Result: " + apiResponse . message
29
+ newParagraphSuccessMsg . textContent = "Result: " + apiResponse . message
30
30
el . appendChild ( newParagraphSuccessMsg )
31
31
// See browser console for more information
32
32
if ( apiResponse . message === "error" ) return
33
33
34
34
// Add ID of Notion item (db, page, comment) to UI
35
35
const newParagraphId = document . createElement ( "p" )
36
- newParagraphId . innerHTML = "ID: " + apiResponse . data . id
36
+ newParagraphId . textContent = "ID: " + apiResponse . data . id
37
37
el . appendChild ( newParagraphId )
38
38
39
39
// Add URL of Notion item (db, page) to UI
@@ -51,12 +51,12 @@ const appendBlocksResponse = function (apiResponse, el) {
51
51
52
52
// Add success message to UI
53
53
const newParagraphSuccessMsg = document . createElement ( "p" )
54
- newParagraphSuccessMsg . innerHTML = "Result: " + apiResponse . message
54
+ newParagraphSuccessMsg . textContent = "Result: " + apiResponse . message
55
55
el . appendChild ( newParagraphSuccessMsg )
56
56
57
57
// Add block ID to UI
58
58
const newParagraphId = document . createElement ( "p" )
59
- newParagraphId . innerHTML = "ID: " + apiResponse . data . results [ 0 ] . id
59
+ newParagraphId . textContent = "ID: " + apiResponse . data . results [ 0 ] . id
60
60
el . appendChild ( newParagraphId )
61
61
}
62
62
0 commit comments