fedimbed: try non-strict equality for anchor tags
This commit is contained in:
parent
91b351fe73
commit
7dcd23d93d
1 changed files with 1 additions and 1 deletions
|
@ -633,7 +633,7 @@ async function processUrl(msg, url, spoiler = false) {
|
||||||
// FIXME: stop being lazy and use an html parser
|
// FIXME: stop being lazy and use an html parser
|
||||||
content = content.replace(
|
content = content.replace(
|
||||||
/<a .*?href="([^"]+?)".*?>(.+?)<\/a>/gi,
|
/<a .*?href="([^"]+?)".*?>(.+?)<\/a>/gi,
|
||||||
(_, url, text) => (url === text ? url : `[${text}](${url})`)
|
(_, url, text) => (url == text ? url : `[${text}](${url})`)
|
||||||
);
|
);
|
||||||
content = content.replace(
|
content = content.replace(
|
||||||
/<img .*?src="([^"]+?)".*?(alt|title)="([^"]+?)".*?\/>/gi,
|
/<img .*?src="([^"]+?)".*?(alt|title)="([^"]+?)".*?\/>/gi,
|
||||||
|
|
Loading…
Reference in a new issue