5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 11:56:21 +00:00

fix: limpiar html remoto

This commit is contained in:
f 2024-03-04 13:11:17 -03:00
parent b8e7e53ebd
commit 01c042b512
No known key found for this signature in database
3 changed files with 12 additions and 10 deletions

View file

@ -3,18 +3,18 @@
.py-2 .py-2
%dl %dl
%dt= t('.profile_name') %dt= t('.profile_name')
%dd= sanitize remote_profile['name'] %dd= text_plain remote_profile['name']
%dt= t('.preferred_name') %dt= t('.preferred_name')
%dd= sanitize remote_profile['preferredUsername'] %dd= text_plain remote_profile['preferredUsername']
%dt= t('.profile_id') %dt= t('.profile_id')
%dd %dd
= link_to sanitize(remote_profile['id']) = link_to text_plain(remote_profile['id'])
- if remote_profile['published'].present? - if remote_profile['published'].present?
%dt= t('.profile_published') %dt= t('.profile_published')
%dd %dd
= render 'layouts/time', time: sanitize(remote_profile['published']) = render 'layouts/time', time: text_plain(remote_profile['published'])
%dt= t('.profile_summary') %dt= t('.profile_summary')
%dd= sanitize remote_profile['summary'] %dd= sanitize remote_profile['summary']

View file

@ -3,9 +3,9 @@
= render 'components/checkbox', id: actor_moderation.id, name: 'actor_moderation[]', value: actor_moderation.id, data: { target: 'select-all.input' } = render 'components/checkbox', id: actor_moderation.id, name: 'actor_moderation[]', value: actor_moderation.id, data: { target: 'select-all.input' }
.col-11 .col-11
%h4 %h4
= link_to sanitize(profile['name']), site_actor_moderation_path(id: actor_moderation) = link_to text_plain(profile['name']), site_actor_moderation_path(id: actor_moderation)
.mb-3 .mb-3
= sanitize profile['summary'].html_safe = sanitize profile['summary']
-# Botones de Moderación -# Botones de Moderación
- cache actor_moderation do - cache actor_moderation do

View file

@ -1,24 +1,26 @@
-# Componente Comentario -# Componente Comentario
- in_reply_to = text_plain comment['inReplyTo']
.row.no-gutters .row.no-gutters
.col-1 .col-1
= render 'components/checkbox', id: comment['id'] = render 'components/checkbox', id: comment['id']
.col-11 .col-11
.d-flex.flex-row.align-items-center.justify-content-between .d-flex.flex-row.align-items-center.justify-content-between
%h4.mb-0 %h4.mb-0
%a{ href: comment['attributedTo'] }= sanitize profile['preferredUsername'] %a{ href: text_plain(comment['attributedTo']) }= text_plain profile['preferredUsername']
%small %small
= render 'layouts/time', time: comment['published'] = render 'layouts/time', time: comment['published']
- if comment['inReplyTo'].present? - if in_reply_to.present?
%dl %dl
%dt.d-inline %dt.d-inline
%small= t('.reply_to') %small= t('.reply_to')
%dd.d-inline %dd.d-inline
%small %small
%a{ href: comment['inReplyTo'] }= sanitize comment['inReplyTo'] %a{ href: in_reply_to) }= in_reply_to
%div %div
- if comment['summary'].present? - if comment['summary'].present?
= render 'layouts/details', summary: comment['summary'], summary_class: 'h5' do = render 'layouts/details', summary: text_plain(comment['summary']), summary_class: 'h5' do
= sanitize comment['content'] = sanitize comment['content']
- else - else
= sanitize comment['content'] = sanitize comment['content']