Skip to content

Commit

Permalink
fix: encode share url (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
wifecooky authored Mar 7, 2022
1 parent 8023c7c commit b8209b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@
<section class="share">
<div class="share-title"><%= __('share') %></div>
<a class="share-item" target="_blank"
href="https://twitter.com/share?text=<%- post.title %> - <%- config.title %>&url=<%- post.permalink %>">
href="https://twitter.com/share?text=<%- post.title %> - <%- config.title %>&url=<%- encodeURIComponent(post.permalink) %>">
<box-icon type='logo' name='twitter'></box-icon>
</a>
<a class="share-item" target="_blank"
href="https://www.facebook.com/sharer.php?title=<%- post.title %> - <%- config.title %>&u=<%- post.permalink %>">
href="https://www.facebook.com/sharer.php?title=<%- post.title %> - <%- config.title %>&u=<%- encodeURIComponent(post.permalink) %>">
<box-icon name='facebook-square' type='logo' ></box-icon>
</a>
<!-- <a class="share-item" target="_blank"
Expand Down

0 comments on commit b8209b4

Please sign in to comment.