npub1[0-9a-z]{10,})/i',
+ function ($matches) {
+ $npub = $matches['npub'];
+ $short = substr($npub, 0, 8) . '...' . substr($npub, -4);
+
+ return sprintf(
+ '@%s',
+ htmlspecialchars($npub, ENT_QUOTES, 'UTF-8'),
+ htmlspecialchars($short, ENT_QUOTES, 'UTF-8')
+ );
+ },
+ $text
+ );
+ }
}
diff --git a/templates/pages/author.html.twig b/templates/pages/author.html.twig
index 10a31c6..568b7ab 100644
--- a/templates/pages/author.html.twig
+++ b/templates/pages/author.html.twig
@@ -9,10 +9,17 @@
{% if author.about is defined %}
- {{ author.about }}
+ {{ author.about|linkify|mentionify }}
{% endif %}
+ {% if relays|length > 0 %}
+ {% for rel in relays %}
+ {{ rel }}
+ {% endfor %}
+ {% endif %}
+
+
{# {% if app.user and app.user.userIdentifier is same as npub %}#}
{# #}
{#
Purchase Search Credits
#}