Skip to content

Commit

Permalink
Make sure author is escaped.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Dec 4, 2016
1 parent 210d378 commit 23a6c11
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion views/dailymotion_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title>[<%= video["duration"].to_duration %>] <%= video["title"].to_line.esc %></title>
<link href="https://www.dailymotion.com/video/<%= video["id"] %>" />
<updated><%= Time.at(video["created_time"]) %></updated>
<author><name><%= @screenname %></name></author>
<author><name><%= @screenname.esc %></name></author>
<content type="html">
<%= <<-EOF.undent.esc
<iframe width="480" height="270" scrolling="no" frameborder="no" src="https://www.dailymotion.com/embed/video/#{video["id"]}" allowfullscreen></iframe>
Expand Down
2 changes: 1 addition & 1 deletion views/facebook_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
%></title>
<link href="<%= link.esc %>" />
<updated><%= Time.parse(post["updated_time"]) %></updated>
<author><name><%= post["from"]["name"] %></name></author>
<author><name><%= post["from"]["name"].esc %></name></author>
<content type="html">
<%= "<p><em>#{post["story"]}</em></p>".esc if post["story"] %>
<%= (post["message"] || post["description"]).linkify.to_paragraphs.esc %>
Expand Down
2 changes: 1 addition & 1 deletion views/googleplus_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title><%= post["title"].to_line.esc %></title>
<link href="<%= post["url"].esc %>" />
<updated><%= Time.parse(post["updated"]) %></updated>
<author><name><%= post["actor"]["displayName"] %></name></author>
<author><name><%= post["actor"]["displayName"].esc %></name></author>
<content type="html">
<%= post["object"]["content"].to_paragraphs(/<br[ \/]*>/).esc %>
<%- if post["object"]["attachments"] -%>
Expand Down
2 changes: 1 addition & 1 deletion views/imgur_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<link href="<%= link.esc %>" />
<link href="<%= img_src.esc %>" rel="enclosure" />
<updated><%= Time.at(image["datetime"].to_i) %></updated>
<author><name><%= @username %></name></author>
<author><name><%= @username.esc %></name></author>
<content type="html">
<%= body -%>
</content>
Expand Down
2 changes: 1 addition & 1 deletion views/instagram_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<title><%= "Video: " if post["is_video"] %><%= post["caption"].to_line.esc rescue "No title" %></title>
<link href="https://www.instagram.com/p/<%= post["code"] %>/" />
<updated><%= Time.at(post["date"]) %></updated>
<author><name><%= @data["full_name"] %></name></author>
<author><name><%= @data["full_name"].esc %></name></author>
<content type="html">
<%=
if post["is_video"]
Expand Down
2 changes: 1 addition & 1 deletion views/mixcloud_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title>[<%= track["audio_length"].to_duration %>] <%= track["name"].to_line.esc %></title>
<link href="<%= track["url"].esc %>" />
<updated><%= Time.parse(track["created_time"]) %></updated>
<author><name><%= track["user"]["username"] %></name></author>
<author><name><%= track["user"]["username"].esc %></name></author>
<content type="html">
<%=
<<-EOF.undent.esc
Expand Down
2 changes: 1 addition & 1 deletion views/periscope_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title><%= post["status"].to_line.esc %></title>
<link href="https://www.periscope.tv/<%= "#{post["username"]}/#{post["id"]}" %>" />
<updated><%= Time.parse(post["created_at"]) %></updated>
<author><name><%= post["user_display_name"] %></name></author>
<author><name><%= post["user_display_name"].esc %></name></author>
<content type="html">
<%= <<-EOF.undent.esc
<p><em>Live in #{post["city"]}.</em></p>
Expand Down
2 changes: 1 addition & 1 deletion views/soundcloud_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title>[<%= (track["duration"] / 1000).to_duration %>] <%= track["title"].to_line.esc %></title>
<link href="<%= track["permalink_url"].esc %>" />
<updated><%= Time.parse(track["created_at"]) %></updated>
<author><name><%= track["user"]["username"] %></name></author>
<author><name><%= track["user"]["username"].esc %></name></author>
<content type="html">
&lt;iframe width="100%" height="185" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/<%= track["id"] %>">&lt;/iframe>

Expand Down
2 changes: 1 addition & 1 deletion views/twitch_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title><%= "* " if video["broadcast_type"] == "highlight" %>[<%= video["length"].to_i.to_duration %>] <%= video["title"].to_line.esc %></title>
<link href="<%= "https://www.twitch.tv/#{video["channel"]["name"]}/v/#{video["_id"][1..-1]}" %>" />
<updated><%= Time.parse(video["created_at"]) %></updated>
<author><name><%= video["channel"]["display_name"] %></name></author>
<author><name><%= video["channel"]["display_name"].esc %></name></author>
<content type="html">
<%= <<-EOF.undent.esc
<p><em>#{video["channel"]["display_name"]} was #{video["game"] ? "playing #{video["game"]}" : "live"}.</em></p>
Expand Down
2 changes: 1 addition & 1 deletion views/twitter_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<title><%= title.to_line.esc %></title>
<link href="https://twitter.com/<%= @username %>/status/<%= tweet["id_str"] %>" />
<updated><%= Time.parse(tweet["created_at"]) %></updated>
<author><name><%= @username %></name></author>
<author><name><%= @username.esc %></name></author>
<content type="html">
<%= body.to_paragraphs.esc %>
</content>
Expand Down
2 changes: 1 addition & 1 deletion views/ustream_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title>[<%= video["length"].to_i.to_duration %>] <%= video["title"].to_line.esc %></title>
<link href="<%= video["url"].esc %>" />
<updated><%= Time.at(video["created_at"]) %></updated>
<author><name><%= video["owner"]["username"] %></name></author>
<author><name><%= video["owner"]["username"].esc %></name></author>
<content type="html">
&lt;iframe width="480" height="270" scrolling="no" frameborder="no" src="https://www.ustream.tv/embed/recorded/<%= video["id"] %>?html5ui" allowfullscreen>&lt;/iframe>

Expand Down
2 changes: 1 addition & 1 deletion views/vine_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<title><%= title.to_line.esc %></title>
<link href="<%= post["permalinkUrl"].esc %>" />
<updated><%= Time.parse(post["created"]) %></updated>
<author><name><%= post["username"] %></name></author>
<author><name><%= post["username"].esc %></name></author>
<content type="html">
<%= <<-EOF.undent.esc
<iframe width="600" height="600" scrolling="no" frameborder="no" src="#{post["permalinkUrl"]}/embed/simple" allowfullscreen></iframe>
Expand Down
2 changes: 1 addition & 1 deletion views/youtube_feed.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<title><%= title.esc %></title>
<link href="https://www.youtube.com/watch?v=<%= video["id"] %>" />
<updated><%= updated %></updated>
<author><name><%= @username %></name></author>
<author><name><%= @username.esc %></name></author>
<content type="html">
<%= <<-EOF.undent.esc
<iframe width="640" height="360" src="https://www.youtube.com/embed/#{video["id"]}?rel=0" frameborder="0" scrolling="no" allowfullscreen></iframe>
Expand Down

0 comments on commit 23a6c11

Please sign in to comment.