@@ -32,12 +32,12 @@ class SocialShareBase extends React.Component {
3232 const hashtags = this . props . hashtags ? this . props . hashtags : '' ;
3333
3434 return React . createElement ( this . props . template , Object . assign ( {
35- fbUrl : `https://www.facebook.com/sharer.php?u=${ fullUrl } ` ,
36- twitterUrl : `https://twitter.com/intent/tweet?url=${ fullUrl } &text=${ this . props . title } &hashtags=${ hashtags } ` ,
37- gplusUrl : `https://plus.google.com/share?url=${ fullUrl } ` ,
38- linkedinUrl : `https://www.linkedin.com/shareArticle?url=${ fullUrl } &title=${ this . props . title } ` ,
39- whatsappUrl : `https://api.whatsapp.com/send?text=${ fullUrl } ` ,
40- mailtoUrl : `mailto:${ '' } ?subject=${ this . props . title } &body=${ fullUrl } ` ,
35+ fbUrl : `https://www.facebook.com/sharer.php?u=${ encodeURIComponent ( fullUrl ) } ` ,
36+ twitterUrl : `https://twitter.com/intent/tweet?url=${ encodeURIComponent ( fullUrl ) } &text=${ encodeURIComponent ( this . props . title ) } &hashtags=${ hashtags } ` ,
37+ gplusUrl : `https://plus.google.com/share?url=${ encodeURIComponent ( fullUrl ) } ` ,
38+ linkedinUrl : `https://www.linkedin.com/shareArticle?url=${ encodeURIComponent ( fullUrl ) } &title=${ encodeURIComponent ( this . props . title ) } ` ,
39+ whatsappUrl : `https://api.whatsapp.com/send?text=${ encodeURIComponent ( fullUrl ) } ` ,
40+ mailtoUrl : `mailto:${ '' } ?subject=${ encodeURIComponent ( this . props . title ) } &body=${ encodeURIComponent ( fullUrl ) } ` ,
4141 handleNativeShare : getNativeShareHandler ( this . state . canNativeShare , this . props . title , fullUrl )
4242 } , this . props ) ) ;
4343 }
0 commit comments