[Rt-commit] rt branch, 4.6/update-ckeditor, updated. rt-4.4.4-425-g3cd775e3f

Jim Brandt jbrandt at bestpractical.com
Wed Oct 16 17:28:41 EDT 2019


The branch, 4.6/update-ckeditor has been updated
       via  3cd775e3fa73bc30455bc1bfd96e2e4842aa52db (commit)
      from  5cacd8a6e403c74a48e366f92fcee68b255fae0c (commit)

Summary of changes:
 lib/RT/Interface/Web/Scrubber.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 3cd775e3fa73bc30455bc1bfd96e2e4842aa52db
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Oct 16 17:27:21 2019 -0400

    Add HTML scrubber rules to allow formats CKEditor 5 generates
    
    When styling fonts and background colors, CKEditor 5 allows
    hsl coloring and generic classes for font size. Allow these
    in the scrubber so the formats show up in ticket history.

diff --git a/lib/RT/Interface/Web/Scrubber.pm b/lib/RT/Interface/Web/Scrubber.pm
index fefffd47a..1b544b4a4 100644
--- a/lib/RT/Interface/Web/Scrubber.pm
+++ b/lib/RT/Interface/Web/Scrubber.pm
@@ -110,7 +110,8 @@ our %ALLOWED_ATTRIBUTES = (
             (?:(?:background-)?color: \s*
                     (?:rgb\(\s* \d+, \s* \d+, \s* \d+ \s*\) |   # rgb(d,d,d)
                        \#[a-f0-9]{3,6}                      |   # #fff or #ffffff
-                       [\w\-]+                                  # green, light-blue, etc.
+                       [\w\-]+                              |   # green, light-blue, etc.
+                       hsl\(\s* \d+, \s* \d+\%, \s* \d+ \s*\%\) # hsl(120,75%,60%)
                        )                            |
                text-align: \s* \w+                  |
                font-size: \s* [\w.\-]+              |
@@ -141,6 +142,7 @@ our %ALLOWED_ATTRIBUTES = (
     border      => 1,
     width       => 1,
     height      => 1,
+    class       => qr/text/,  # generic classes like 'text-huge'
 
     # timeworked per user attributes
     'data-ticket-id'    => 1,

-----------------------------------------------------------------------


More information about the rt-commit mailing list