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

feat: darle formato al html guardado #14417

This commit is contained in:
f 2024-03-25 14:29:05 -03:00
parent 453798dcc7
commit 8384a8a32a
No known key found for this signature in database
3 changed files with 6 additions and 1 deletions

View file

@ -76,6 +76,7 @@ gem 'webpacker'
gem 'yaml_db', git: 'https://0xacab.org/sutty/yaml_db.git'
gem 'kaminari'
gem 'device_detector'
gem 'htmlbeautifier'
# database
gem 'hairtrigger'

View file

@ -255,6 +255,7 @@ GEM
heapy (0.2.0)
thor
hiredis (0.6.3-x86_64-linux-musl)
htmlbeautifier (1.4.2)
http_parser.rb (0.8.0-x86_64-linux-musl)
httparty (0.21.0)
mini_mime (>= 1.0.0)
@ -616,6 +617,7 @@ DEPENDENCIES
haml-lint
hamlit-rails
hiredis
htmlbeautifier
httparty
icalendar
image_processing

View file

@ -1,5 +1,7 @@
# frozen_string_literal: true
require 'htmlbeautifier'
# Se encarga del contenido del artículo y quizás otros campos que
# requieran texto largo.
class MetadataContent < MetadataTemplate
@ -86,7 +88,7 @@ class MetadataContent < MetadataTemplate
end
end
html.to_s.html_safe
HtmlBeautifier.beautify(html.to_s).html_safe
end
# Limpia estilos en base a una lista de permitidos