Adjust encoding
parent
875ae030f7
commit
ca663261be
|
|
@ -31,10 +31,10 @@ export class SharePopupComponent implements OnInit {
|
||||||
let port = this.document.location.port ? ":"+this.document.location.port : "";
|
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;
|
this.shareUrl = this.document.location.protocol +'//'+ this.document.location.hostname + port + this.shareBaseUrl + data.prefix + this.id;
|
||||||
if (this.data.prefix === 'o') {
|
if (this.data.prefix === 'o') {
|
||||||
const shareData = encodeURIComponent(JSON.stringify(this.data.otherData));
|
const str = JSON.stringify(this.data.otherData);
|
||||||
console.log(shareData);
|
const encoded = encodeURIComponent(str);
|
||||||
|
const shareData = encoded;
|
||||||
this.shareUrl = this.document.location.protocol + '//' + this.document.location.hostname + port + this.shareBaseUrl + data.prefix + shareData;
|
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.facebookIframeUrl = this.urlPartA + this.shareUrl + this.urlPartB;
|
||||||
this.twitterUrl = this.twitterPartA + data.title + " - " + data.description + "&url=" + this.shareUrl;
|
this.twitterUrl = this.twitterPartA + data.title + " - " + data.description + "&url=" + this.shareUrl;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue