Skip to content
This repository was archived by the owner on Jan 1, 2026. It is now read-only.

Commit ed8d60e

Browse files
committed
FIX: Filter empty tabs from intake module
Also change behavior of RawHTML to allow all attributes when sanitizing
1 parent 2ec15b9 commit ed8d60e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import sanitizeHtml from 'sanitize-html'
22

33
function RawHTML({html}) {
4-
return <div dangerouslySetInnerHTML={{__html: sanitizeHtml(html)}} />;
4+
return <div dangerouslySetInnerHTML={{__html: sanitizeHtml(html, {
5+
allowedAttributes: false
6+
})}} />;
57
}
68

79
export default RawHTML;

forthic/v3/modules/intake_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
145145
: config-TAB config @ 'tab' REC@;
146146
: config-STEP-TABS config @ 'step_tabs' REC@;
147-
: config-TABS [config-TAB config-STEP-TABS] FLATTEN;
147+
: config-TABS [config-TAB config-STEP-TABS] FLATTEN ">BOOL" SELECT;
148148
149149
: <ADD-FIELD-RECORDS (config !@) config-TABS DUP "(tab ! tab-ENSURE-TAB) tab-FIELD-RECORDS" MAP ZIP REC "field_records" <REC!;
150150
: config-FIELD-RECORDS config @ 'field_records' REC@ VALUES FLATTEN;

0 commit comments

Comments
 (0)