Adjust encoding

test
dan 2020-03-29 16:54:18 -06:00
parent 875ae030f7
commit ca663261be
1 changed files with 3 additions and 3 deletions

View File

@ -31,10 +31,10 @@ export class SharePopupComponent implements OnInit {
let port = this.document.location.port ? ":"+this.document.location.port : "";
this.shareUrl = this.document.location.protocol +'//'+ this.document.location.hostname + port + this.shareBaseUrl + data.prefix + this.id;
if (this.data.prefix === 'o') {
const shareData = encodeURIComponent(JSON.stringify(this.data.otherData));
console.log(shareData);
const str = JSON.stringify(this.data.otherData);
const encoded = encodeURIComponent(str);
const shareData = encoded;
this.shareUrl = this.document.location.protocol + '//' + this.document.location.hostname + port + this.shareBaseUrl + data.prefix + shareData;
console.log(this.shareUrl);
}
this.facebookIframeUrl = this.urlPartA + this.shareUrl + this.urlPartB;
this.twitterUrl = this.twitterPartA + data.title + " - " + data.description + "&url=" + this.shareUrl;