diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-03-07 13:28:45 +1100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-05-07 17:21:58 +0100 |
commit | cd6d68c3773dfec2cdf1ec899db7ee3392ec6d00 (patch) | |
tree | 4400d2a0d153f219a704adbb26a32222fc69a999 | |
parent | d7cf7063d905108cef930926d57d988682fd3fd8 (diff) |
Encode parameters of Twitter link
(reapplication of 3e2b161944cc4419002831d54c6bdfcd6aa30a01 as it seems to have been lost in a merge). No casting to string as there don't appear to be problems with the ':' character.
Conflicts:
app/views/request/_sidebar.html.erb
-rw-r--r-- | app/views/request/_sidebar.html.erb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/request/_sidebar.html.erb b/app/views/request/_sidebar.html.erb index e0b01924d..4bc8826fd 100644 --- a/app/views/request/_sidebar.html.erb +++ b/app/views/request/_sidebar.html.erb @@ -36,8 +36,8 @@ <h2><%= _("Act on what you've learnt") %></h2> <div class="act_link"> - <% tweet_link = "https://twitter.com/share?url=#{h(request.url)}&via=#{h(AlaveteliConfiguration::twitter_username)}&text='#{h(@info_request.title)}'&related=#{_('alaveteli_foi:The software that runs {{site_name}}', :site_name => h(site_name))}" %> - <%= link_to tweet_link do %> + <% tweet_link = "https://twitter.com/share?" + {:url => request.url, :via => AlaveteliConfiguration::twitter_username, :text => "'#{@info_request.title}'", :related => _('alaveteli_foi:The software that runs {{site_name}}', :site_name => site_name)}.to_query %> + <% link_to tweet_link do %> <%= image_tag "twitter-16.png", :alt => "twitter icon" %> <% end %> <%= link_to _("Tweet this request"), tweet_link %> |