Fix for hash in caption name causing Facebook share to fail

This commit is contained in:
Eric Schultz 2018-11-27 13:15:53 -06:00
parent b77c8cec41
commit a7867e894d

View file

@ -14,7 +14,7 @@ function view(state) {
h('a.button--small.facebook.u-width--full.share-button', { h('a.button--small.facebook.u-width--full.share-button', {
props: { props: {
target: '_blank' target: '_blank'
, href: 'https://www.facebook.com/dialog/feed?app_id='+app.facebook_app_id +"&display=popup&caption=" + (app.campaign.name || app.nonprofit.name) + "&link="+window.location.href , href: 'https://www.facebook.com/dialog/feed?app_id='+app.facebook_app_id +"&display=popup&caption=" + encodeURIComponent(app.campaign.name || app.nonprofit.name) + "&link="+window.location.href
} }
}, [h('i.fa.fa-facebook-square'), ` ${I18n.t('nonprofits.donate.followup.share.facebook')}`] ) }, [h('i.fa.fa-facebook-square'), ` ${I18n.t('nonprofits.donate.followup.share.facebook')}`] )
]) ])