fix: image url host missing (#623)

This commit is contained in:
boojack
2022-11-28 19:52:03 +08:00
committed by GitHub
parent fbe7b604ef
commit b04e001db1
2 changed files with 9 additions and 1 deletions

View File

@ -134,3 +134,9 @@ export const parseHTMLToRawText = (htmlStr: string): string => {
const text = tempEl.innerText;
return text;
};
export function absolutifyLink(rel: string): string {
const anchor = document.createElement("a");
anchor.setAttribute("href", rel);
return anchor.href;
}