diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d74cc305aff2eb00286af5bb50396539928a491..0fdf84492628d5435490a565f5b40ff4c8445f4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ pointing to the main user. * In the comment section for a page if a user doesnt have a profile picture setup it will now default to a generic avatar rather than render text. +* Removed image alt text when rendering page comments. If an image profile link + wqs broken the rendered text would not look right. ## 1.0.1 diff --git a/api/activitypub-html/render.ts b/api/activitypub-html/render.ts index 1bc1b74dd596d07c2d4b6b68c5fbe58cd2a3f081..52f6944be88058e56f9b6cd76bf9fb6a8376455e 100644 --- a/api/activitypub-html/render.ts +++ b/api/activitypub-html/render.ts @@ -121,7 +121,7 @@ export default async function (req: VercelRequest, res: VercelResponse) { if( actor.icon != undefined) { actor_icon_url = actor.icon.url; } - return `<a title="${escapeHTML(actor.name)}" href="${escapeHTML(actor.url)}" target="_parent" rel="nofollow"><img class="profile" src="${escapeHTML(actor_icon_url)}" alt="The profile picture of ${escapeHTML(actor.name)}"></a>`; + return `<a title="${escapeHTML(actor.name)}" href="${escapeHTML(actor.url)}" target="_parent" rel="nofollow"><img class="profile" src="${escapeHTML(actor_icon_url)}"></a>`; } else { return ""; } @@ -139,7 +139,7 @@ export default async function (req: VercelRequest, res: VercelResponse) { if( actor.icon != undefined) { actor_icon_url = actor.icon.url; } - return `<a title="${escapeHTML(actor.name)}" href="${escapeHTML(actor.url)}" target="_parent" rel="nofollow"><img class="profile" src="${escapeHTML(actor_icon_url)}" alt="The profile picture of ${escapeHTML(actor.name)}"></a>`; + return `<a title="${escapeHTML(actor.name)}" href="${escapeHTML(actor.url)}" target="_parent" rel="nofollow"><img class="profile" src="${escapeHTML(actor_icon_url)}"></a>`; } else { return ""; } @@ -158,7 +158,7 @@ export default async function (req: VercelRequest, res: VercelResponse) { actor_icon_url = actor.icon.url; } return `<div class="reply"> - <p><a title="${escapeHTML(actor.name)}" href="${escapeHTML(actor.url)}" target="_parent" rel="nofollow"><img class="profile" src="${escapeHTML(actor_icon_url)}" alt="The profile picture of ${escapeHTML(actor.name)}"></a>${escapeHTML(actor.name)} wrote: <blockquote>${escapeHTML(stripHTML(object.content))}</blockquote></p> + <p><a title="${escapeHTML(actor.name)}" href="${escapeHTML(actor.url)}" target="_parent" rel="nofollow"><img class="profile" src="${escapeHTML(actor_icon_url)}"></a>${escapeHTML(actor.name)} wrote: <blockquote>${escapeHTML(stripHTML(object.content))}</blockquote></p> </div>` } else {