You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2014/09/18 11:01:22 UTC

svn commit: r1625920 - in /tomee/site/trunk: content/contribute.mdtext templates/basic.html

Author: andygumbrecht
Date: Thu Sep 18 09:01:21 2014
New Revision: 1625920

URL: http://svn.apache.org/r1625920
Log:
Encode

Modified:
    tomee/site/trunk/content/contribute.mdtext
    tomee/site/trunk/templates/basic.html

Modified: tomee/site/trunk/content/contribute.mdtext
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/contribute.mdtext?rev=1625920&r1=1625919&r2=1625920&view=diff
==============================================================================
--- tomee/site/trunk/content/contribute.mdtext (original)
+++ tomee/site/trunk/content/contribute.mdtext Thu Sep 18 09:01:21 2014
@@ -21,7 +21,7 @@ The more people we reach the more the pr
    <a onclick="javascript:fbshare()" class="fb-share sprite" title="share on Facebook">share [fb]</a>
  - Share pages you like on Google+  
    <a onclick="javascript:gpshare()" class="gp-share sprite" title="share on Google+">share [gp]</a>
- - Share pages you like on Pinterest
+ - Share pages you like on Pinterest  
    <a onclick="javascript:pinshare()" class="pin-share sprite" title="Share on Pinterest">share [pin]</a>
 
 Doing these things as often as possible are simple and powerful ways to help.  Do your part and watch the project grow grow grow!

Modified: tomee/site/trunk/templates/basic.html
URL: http://svn.apache.org/viewvc/tomee/site/trunk/templates/basic.html?rev=1625920&r1=1625919&r2=1625920&view=diff
==============================================================================
--- tomee/site/trunk/templates/basic.html (original)
+++ tomee/site/trunk/templates/basic.html Thu Sep 18 09:01:21 2014
@@ -23,26 +23,30 @@
     <link href="{{base}}resources/css/main.css" rel="stylesheet">
 
     <script type="text/javascript">
+    
+        var t = encodeURIComponent("{{ headers.title }}".replace(/^\s+|\s+$/g,""));
+        var u = encodeURIComponent(""+document.URL);
+    
       function fbshare () {
           window.open(
-                  "http://www.facebook.com/sharer/sharer.php?u="+document.URL,
+                  "http://www.facebook.com/sharer/sharer.php?u="+u,
                   'Share on Facebook',
                   'width=640,height=426');
       };
       function gpshare () {
           window.open(
-                  "https://plus.google.com/share?url="+document.URL,
+                  "https://plus.google.com/share?url="+u,
                   'Share on Google+',
                   'width=584,height=385');
       };
       function twshare () {
           window.open(
-                  "https://twitter.com/intent/tweet?url="+document.URL+"&text={{ headers.title }}",
+                  "https://twitter.com/intent/tweet?url="+u+"&text="+t,
                   'Share on Twitter',
                   'width=800,height=526');
       };
       function pinshare () {
-          window.open("//www.pinterest.com/pin/create/button/?url="+document.URL+"&media=http%3A%2F%2Ftomee.apache.org%2Fresources%2Fimages%2Ffeather-logo.png&description={{ headers.title }}",
+          window.open("//www.pinterest.com/pin/create/button/?url="+u+"&media=http%3A%2F%2Ftomee.apache.org%2Fresources%2Fimages%2Ffeather-logo.png&description="+t,
                   'Share on Pinterest',
                   'width=800,height=526');
       };