Replace http with https in links (#521)

* Comment liquid tag - https

Replaced `http` for `https` in twitter and github links

* User tag - Https

Replaced `http` with `https` in github and twitter links.

* Comments - Https

Replaced http with https for github and twitter links

* Article index

Article - Update twitter and github link from http to https

* Article markdown - Http to Https

Article markdown - replaced http with https

* Comment view: Closed `a` tag

An `a` tag was not correctly closed, before injecting an image. This commit closed it.
This commit is contained in:
Antony Garand 2018-08-30 16:06:38 -04:00 committed by Mac Siri
parent f1abd283f9
commit e7a0911b81
5 changed files with 10 additions and 10 deletions

View file

@ -31,12 +31,12 @@ class CommentTag < LiquidTagBase
def render_twitter_and_github
result = ""
if @comment.user.twitter_username.present?
result += "<a href=\"http://twitter.com/#{@comment.user.twitter_username}\">" \
result += "<a href=\"https://twitter.com/#{@comment.user.twitter_username}\">" \
+image_tag("/assets/twitter-logo.svg", class: "icon-img", alt: "twitter") + \
"</a>"
end
if @comment.user.github_username.present?
result + "<a href=\"http://github.com/#{@comment.user.github_username}\">" \
result + "<a href=\"https://github.com/#{@comment.user.github_username}\">" \
+image_tag("/assets/github-logo.svg", class: "icon-img", alt: "github") + \
"</a>"
end

View file

@ -53,7 +53,7 @@ class UserTag < LiquidTagBase
def twitter_link
if @user.twitter_username.present?
<<-HTML
<a href="http://twitter.com/#{@user.twitter_username}" target="_blank" rel="noopener">
<a href="https://twitter.com/#{@user.twitter_username}" target="_blank" rel="noopener">
#{image_tag('/assets/twitter-logo.svg', class: 'icon-img', alt: 'twitter')} #{@user.twitter_username}
</a>
HTML
@ -63,7 +63,7 @@ class UserTag < LiquidTagBase
def github_link
if @user.github_username.present?
<<-HTML
<a href="http://github.com/#{@user.github_username}" target="_blank" rel="noopener">
<a href="https://github.com/#{@user.github_username}" target="_blank" rel="noopener">
#{image_tag('/assets/github-logo.svg', class: 'icon-img', alt: 'github')} #{@user.github_username}
</a>
HTML

View file

@ -108,10 +108,10 @@
By <%= @user.name %>
</a>
<% if @user.twitter_username.present? %>
<a href="http://twitter.com/<%= @user.twitter_username %>"><%= icon("twitter","20") %></a>
<a href="https://twitter.com/<%= @user.twitter_username %>"><%= icon("twitter","20") %></a>
<% end %>
<% if @user.github_username.present? %>
<a href="http://github.com/<%= @user.github_username %>"><%= icon("github","20") %></a>
<a href="https://github.com/<%= @user.github_username %>"><%= icon("github","20") %></a>
<% end %>
<span class="published-at"><%= "on "+@article.published_at.strftime("%B %d, %Y") if @article.published_at %></span>
</h3>

View file

@ -124,12 +124,12 @@
</style>
<p class="social">
<% if @user.twitter_username.present? %>
<a href="http://twitter.com/<%= @user.twitter_username %>" target="_blank" rel="noopener">
<a href="https://twitter.com/<%= @user.twitter_username %>" target="_blank" rel="noopener">
<%= inline_svg("twitter-logo.svg", class:"icon-img") %>
</a>
<% end %>
<% if @user.github_username.present? %>
<a href="http://github.com/<%= @user.github_username %>" target="_blank" rel="noopener">
<a href="https://github.com/<%= @user.github_username %>" target="_blank" rel="noopener">
<%= inline_svg("github-logo.svg", class:"icon-img") %>
</a>
<% end %>

View file

@ -19,10 +19,10 @@
</span>
</a>
<% if comment.user.twitter_username.present? %>
<a href="http://twitter.com/<%= comment.user.twitter_username %>" rel="noopener noreferrer" target="_blank"<%= image_tag("twitter-logo.svg", class:"icon-img") %></a>
<a href="https://twitter.com/<%= comment.user.twitter_username %>" rel="noopener noreferrer" target="_blank"><%= image_tag("twitter-logo.svg", class:"icon-img") %></a>
<% end %>
<% if comment.user.github_username.present? %>
<a href="http://github.com/<%= comment.user.github_username %>" rel="noopener noreferrer" target="_blank"><%= image_tag("github-logo.svg", class:"icon-img") %></a>
<a href="https://github.com/<%= comment.user.github_username %>" rel="noopener noreferrer" target="_blank"><%= image_tag("github-logo.svg", class:"icon-img") %></a>
<% end %>
<% if commentable && (commentable.user_id == comment.user_id ||
commentable.second_user_id == comment.user_id ||