Skip to content

Commit

Permalink
fix!: add missing encoding for media links
Browse files Browse the repository at this point in the history
Close #10
  • Loading branch information
paodb authored and javier-godoy committed May 14, 2024
1 parent 3e5a68a commit 3fa9c9f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ window.fcShareeConnector = {
*/
_updateSocialShareLinks() {
Sharee.drivers['facebook'].prototype.getLink = function () {
return `https://facebook.com/sharer/sharer.php?u=${this.options?.shareLink}&t=${encodeURIComponent(this.options?.shareText)}`
return `https://facebook.com/sharer/sharer.php?u=${encodeURIComponent(this.options?.shareLink)}&t=${encodeURIComponent(this.options?.shareText)}`
}
Sharee.drivers['whatsapp'].prototype.getLink = function () {
return `https://wa.me?text=${this.options?.shareText} \n ${this.options?.shareLink}`
return `https://wa.me?text=${encodeURIComponent(this.options?.shareText)} \n ${encodeURIComponent(this.options?.shareLink)}`
}
Sharee.drivers['twitter'].prototype.getLink = function () {
return `https://twitter.com/intent/tweet?text=${encodeURIComponent(this.options?.shareText)}&url=${this.options?.shareLink}`
return `https://twitter.com/intent/tweet?text=${encodeURIComponent(this.options?.shareText)}&url=${encodeURIComponent(this.options?.shareLink)}`
}
Sharee.drivers['linkedin'].prototype.getLink = function () {
return `https://www.linkedin.com/shareArticle?url=${this.options?.shareLink}`
return `https://www.linkedin.com/shareArticle?url=${encodeURIComponent(this.options?.shareLink)}`
}
},

Expand Down

0 comments on commit 3fa9c9f

Please sign in to comment.