diff options
| author | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2024-04-09 18:04:21 -0400 |
|---|---|---|
| committer | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2024-04-10 18:21:53 -0400 |
| commit | 039212ed9199ebcac7686bdb1c562c86d708cfc9 (patch) | |
| tree | c72795d6ffa900e729f9df511887e09180e7950e /src | |
| parent | a9f55aa31062e148bd0fa15636a004762acabedd (diff) | |
| download | invidious-039212ed9199ebcac7686bdb1c562c86d708cfc9.tar.gz invidious-039212ed9199ebcac7686bdb1c562c86d708cfc9.tar.bz2 invidious-039212ed9199ebcac7686bdb1c562c86d708cfc9.zip | |
escape html, add todo comment
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/comments/youtube.cr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious/comments/youtube.cr b/src/invidious/comments/youtube.cr index 4c6a0d56..ee1568e5 100644 --- a/src/invidious/comments/youtube.cr +++ b/src/invidious/comments/youtube.cr @@ -141,7 +141,8 @@ module Invidious::Comments comment_mutation = mutations.find { |i| i.dig?("payload", "commentEntityPayload", "key") == comment_key } toolbar_mutation = mutations.find { |i| i.dig?("entityKey") == toolbar_key } if !comment_mutation.nil? && !toolbar_mutation.nil? - html_content = comment_mutation.dig("payload", "commentEntityPayload", "properties", "content", "content").as_s + # todo parse styleRuns, commandRuns and attachmentRuns for comments + html_content = HTML.escape(comment_mutation.dig("payload", "commentEntityPayload", "properties", "content", "content").as_s) if comment_author = comment_mutation.dig?("payload", "commentEntityPayload", "author") json.field "authorId", comment_author["channelId"].as_s json.field "authorUrl", "/channel/#{comment_author["channelId"].as_s}" |
