From 7d5b1ef59605a79256a056e8294348619c0c3fc0 Mon Sep 17 00:00:00 2001 From: skalimer0 <8110622+skalimer0@users.noreply.github.com> Date: Tue, 4 Jun 2024 12:16:20 +0200 Subject: [PATCH] add code tag --- lib/rbpdf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rbpdf.rb b/lib/rbpdf.rb index 061d079..df8e5d0 100755 --- a/lib/rbpdf.rb +++ b/lib/rbpdf.rb @@ -13420,7 +13420,7 @@ def sanitize_html(html) # Escape '<' character for not tag case. html = html.gsub(%r{(<+)([^/a-zA-Z])}){CGI.escapeHTML($1) + $2}.gsub(%r{ %w(a b blockquote body br dd del div dl dt em font form h1 h2 h3 h4 h5 h6 hr i img input label li ol option p pre select small span strong sub sup table td textarea th thead tr tt u ins ul), + :tags=> %w(a b blockquote body br code dd del div dl dt em font form h1 h2 h3 h4 h5 h6 hr i img input label li ol option p pre select small span strong sub sup table td textarea th thead tr tt u ins ul), :attributes => %w(cellspacing cellpadding bgcolor color value width height src size colspan rowspan style align border face href name dir class id nobr stroke strokecolor fill nested tablehead cols rows type action enctype method maxlength onclick multiple checked disabled)) end protected :sanitize_html