fixed quotes and made a safelink function
This commit is contained in:
parent
e3185a06c6
commit
04779b6c6c
7 changed files with 156 additions and 14 deletions
|
@ -65,7 +65,7 @@ class Embed{
|
|||
const a=document.createElement("a");
|
||||
a.textContent=this.json.author.name as string;
|
||||
if(this.json.author.url){
|
||||
a.href=this.json.author.url;
|
||||
MarkDown.safeLink(a,this.json.author.url);
|
||||
}
|
||||
a.classList.add("username");
|
||||
authorline.append(a);
|
||||
|
@ -75,7 +75,7 @@ class Embed{
|
|||
const title=document.createElement("a");
|
||||
title.append(new MarkDown(this.json.title,this.channel).makeHTML());
|
||||
if(this.json.url){
|
||||
title.href=this.json.url;
|
||||
MarkDown.safeLink(title,this.json.url);
|
||||
}
|
||||
title.classList.add("embedtitle");
|
||||
embed.append(title);
|
||||
|
@ -162,7 +162,7 @@ class Embed{
|
|||
if(this.json.url&&this.json.title){
|
||||
const td=document.createElement("td");
|
||||
const a=document.createElement("a");
|
||||
a.href=this.json.url;
|
||||
MarkDown.safeLink(a,this.json.url);
|
||||
a.textContent=this.json.title;
|
||||
td.append(a);
|
||||
trtop.append(td);
|
||||
|
@ -207,7 +207,7 @@ class Embed{
|
|||
}
|
||||
const a=document.createElement("a");
|
||||
if(this.json.url&&this.json.url){
|
||||
a.href=this.json.url;
|
||||
MarkDown.safeLink(a,this.json.url);
|
||||
a.textContent=this.json.url;
|
||||
div.append(a);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue