Skip to content
Snippets Groups Projects
Commit be6778ac authored by syuilo's avatar syuilo
Browse files

chore(backend): improve performance

parent 7d24b29e
No related branches found
No related tags found
No related merge requests found
......@@ -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,
}));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment