diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-05-11 18:14:50 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-05-11 18:14:50 -0400 |
| commit | b6d75b6040f3832b21c3650a2399eefadc647b5f (patch) | |
| tree | 471afde9f9649ad4352d7bac44a5ffa3abef60c5 | |
| parent | d476a1d1f03d301861e5b0a1e08ddbbd53ad275e (diff) | |
Use textContent instead of innerHTML
| -rw-r--r-- | haunt/js/webmention.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/haunt/js/webmention.js b/haunt/js/webmention.js index 085f525..d1bb8e8 100644 --- a/haunt/js/webmention.js +++ b/haunt/js/webmention.js @@ -82,13 +82,13 @@ function makeComment(comment) { "class": "p-name u-url", "href": comment.author.url }); - authorName.innerHTML = comment.author.name; + authorName.textContent = comment.author.name; let authorURI = element("a", { "class": "author_url", "href": comment.author.url }); - authorURI.innerHTML = strip(comment.author.url); + authorURI.textContent = strip(comment.author.url); let hCardContainer = element("div", { "class": "p-author h-card author" @@ -101,14 +101,14 @@ function makeComment(comment) { let contentContainer = element("div", { "class": "e-content p-name comment-content", }); - contentContainer.innerHTML = comment.content.text; + contentContainer.textContent = comment.content.text; // Create the metaline section. let time = element("time", { "class": "dt-published", "datetime": comment.published }); - time.innerHTML = (new Date(comment.published)).toString(); + time.textContent = (new Date(comment.published)).toString(); let linkBack = element("a", { "class": "u-url", |