Skip to content

Commit

Permalink
chore(backend): improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Nov 15, 2023
1 parent 7d24b29 commit be6778a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/core/activitypub/ApRendererService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ export class ApRendererService {
const attachment = profile.fields.map(field => ({
type: 'PropertyValue',
name: field.name,
value: /^https?:/.test(field.value)
value: (field.value.startsWith('http://') || field.value.startsWith('https://'))
? `<a href="${new URL(field.value).href}" rel="me nofollow noopener" target="_blank">${new URL(field.value).href}</a>`
: field.value,
}));
Expand Down

0 comments on commit be6778a

Please sign in to comment.