Merge pull request #51 from emailerfacu-spec/dev

modificadas las reglas de como renderizo los posts
This commit is contained in:
emailerfacu-spec
2025-12-26 19:08:53 -03:00
committed by GitHub

View File

@@ -45,9 +45,17 @@
let errorLike = $state(false); let errorLike = $state(false);
let contenido = $derived(() => { let contenido = $derived(() => {
let t = post.content.replaceAll('\n', '<br>'); let t = '';
t = post.content.replaceAll('<', ''); t = post.content
t = t.replace( .replaceAll('&', '&amp;')
.replaceAll('<', '&lt;')
.replaceAll('>', '&gt;')
.replaceAll('"', '&quot;')
.replaceAll("'", '&#039;')
.replaceAll('fetch', '');
t = post.content.replaceAll('\n', '<br>');
t = t.replaceAll(
/#\p{L}*/u, /#\p{L}*/u,
(match) => (match) =>
`<a class="hover:text-blue-200 text-blue-400" href="/htag/${match.replace('#', '')}">${match}</a>` `<a class="hover:text-blue-200 text-blue-400" href="/htag/${match.replace('#', '')}">${match}</a>`