Fix title and description

This commit is contained in:
John Marlo 2022-04-01 18:20:58 +08:00 committed by GitHub
parent dd372a2dd3
commit 4d96b4abe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -251,10 +251,10 @@ class WebEmbed {
async toMessage() { async toMessage() {
const arrayQuery = []; const arrayQuery = [];
if (this.title) { if (this.title) {
arrayQuery.push(`title=${this.title}`); arrayQuery.push(`title=${encodeURIComponent(this.title)}`);
} }
if (this.description) { if (this.description) {
arrayQuery.push(`description=${this.description}`); arrayQuery.push(`description=${encodeURIComponent(this.description)}`);
} }
if (this.url) { if (this.url) {
arrayQuery.push(`url=${encodeURIComponent(this.url)}`); arrayQuery.push(`url=${encodeURIComponent(this.url)}`);