From 2232bc04958de6d4c231ca8a76ae43c0631c32be Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 13 Sep 2018 18:12:19 -0500 Subject: [PATCH] Use escaped newlines instead of graves --- src/invidious/views/components/player.ecr | 4 +-- src/invidious/views/watch.ecr | 43 +++++++++++------------ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index 38a4bbe1..4bdd7832 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -63,8 +63,8 @@ var shareOptions = { title: "<%= video.title.dump_unquoted %>", description: "<%= description %>", image: "<%= thumbnail %>", - embedCode: `` + embedCode: "" }; var player = videojs("player", options, function() { diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 98c28d6a..9437dba3 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -205,19 +205,18 @@ function get_reddit_comments() { if (xhr.readyState == 4) if (xhr.status == 200) { comments = document.getElementById("comments"); - comments.innerHTML = ` -
-

- [ - ] - {title} -

- - View more comments on Reddit - -
-
{contentHtml}
- -
`.supplant({ + comments.innerHTML = ' \ +
\ +

\ + [ - ] \ + {title} \ +

\ + \ + View more comments on Reddit \ + \ +
\ +
{contentHtml}
\ +
'.supplant({ title: xhr.response.title, permalink: xhr.response.permalink, contentHtml: xhr.response.contentHtml @@ -252,15 +251,15 @@ function get_youtube_comments() { if (xhr.status == 200) { comments = document.getElementById("comments"); if (xhr.response.commentCount > 0) { - comments.innerHTML = ` -
-

- [ - ] - View {commentCount} comments -

-
-
{contentHtml}
-
`.supplant({ + comments.innerHTML = ' \ +
\ +

\ + [ - ] \ + View {commentCount} comments \ +

\ +
\ +
{contentHtml}
\ +
'.supplant({ contentHtml: xhr.response.contentHtml, commentCount: commaSeparateNumber(xhr.response.commentCount) });