Skip to content

Commit 7eee63f

Browse files
authored
BACKLOG-22209 Allow to keep border and cellpadding/spacing on table (#9)
* BACKLOG-22209 Allow to keep border and cellpadding/spacing on table * BACKLOG-22209 Fix test * BACKLOG-22209 Fix test
1 parent b457804 commit 7eee63f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/resources/META-INF/configuration-default/org.jahia.modules.richtext.config-default.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,9 @@ htmlFiltering:
6464
elements: a, blockquote, button, col, del, ins, link, q
6565
- name: value
6666
elements: li
67+
- name: border
68+
elements: table
69+
- name: cellpadding, cellspacing
70+
elements: table
6771
elements:
6872
- name: h1, h2, h3, h4, h5, h6, hgroup, p, a, img, figure, figcaption, canvas, picture, br, strong, b, em, i, span, div, ul, ol, li, dl, dd, dt, table, tbody, thead, tfoot, tr, td, th, col, colgroup, caption, blockquote, q, cite, code, pre, var, abbr, address, del, s, details, summary, ins, sub, sup, small, mark, hr, button, legend, audio, video, source, track, nav, article, main, aside, section, time, header, footer, wbr, u

tests/cypress/e2e/filteringAPI.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('HTML rich text filtering API', () => {
4646
siteKey: siteKey
4747
}
4848
}).then(response => {
49-
expect(response.data.richtextConfiguration.htmlFiltering.richtextConfiguration.attributes).length(37);
49+
expect(response.data.richtextConfiguration.htmlFiltering.richtextConfiguration.attributes).length(40);
5050
expect(response.data.richtextConfiguration.htmlFiltering.richtextConfiguration.attributes.find(a => a.attribute === 'class')).to.deep.equal({
5151
attribute: 'class',
5252
elements: [],
@@ -64,7 +64,7 @@ describe('HTML rich text filtering API', () => {
6464
pattern: null,
6565
__typename: 'GqlRichTextConfigAttribute'
6666
});
67-
expect(response.data.richtextConfiguration.htmlFiltering.richtextConfiguration.elements).length(70);
67+
expect(response.data.richtextConfiguration.htmlFiltering.richtextConfiguration.elements).length(71);
6868
expect(response.data.richtextConfiguration.htmlFiltering.richtextConfiguration.protocols).length(3);
6969
expect(response.data.richtextConfiguration.htmlFiltering.richtextConfiguration.disallow.elements).length(1);
7070
expect(response.data.richtextConfiguration.htmlFiltering.richtextConfiguration.disallow.elements).contain('strong');

0 commit comments

Comments
 (0)