url encoding for share button
This commit is contained in:
parent
c9dd3cb9eb
commit
725bfcac5a
|
@ -39,14 +39,14 @@
|
|||
</div>
|
||||
|
||||
<%= share_links(@bulletin, 'announcement') %>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u=<%= request.url %>&t=<%= @bulletin.title %>" target="_blank" class="fb-share-button">
|
||||
<a href="<%= request.url %>&t=<%= @bulletin.title %>" target="_blank" class="fb-share-button">
|
||||
<%= image_tag("announcement/fbn.png",:width=>30, :height=>30) %>
|
||||
</a>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$(".fb-share-button").click(function(){
|
||||
var url = $(this).attr("href");
|
||||
var url = "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent($(this).attr("href"));
|
||||
newwindow = window.open(url,'name','height=500,width=1024');
|
||||
if (window.focus) {newwindow.focus()}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue