mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-17 15:47:31 -03:00
Merge pull request #51 from emailerfacu-spec/dev
modificadas las reglas de como renderizo los posts
This commit is contained in:
@@ -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('&', '&')
|
||||||
|
.replaceAll('<', '<')
|
||||||
|
.replaceAll('>', '>')
|
||||||
|
.replaceAll('"', '"')
|
||||||
|
.replaceAll("'", ''')
|
||||||
|
.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>`
|
||||||
|
|||||||
Reference in New Issue
Block a user