Skip to content

Commit 6854687

Browse files
committed
Merge branch 'v25-12' into release
2 parents ad540a0 + a8d96fd commit 6854687

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

app/Util/ConfiguredHtmlPurifier.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ public function configureDefinition(HTMLPurifier_HTMLDefinition $definition): vo
134134
'value' => 'Text',
135135
]
136136
);
137+
138+
// Allow the drawio-diagram attribute on div elements
139+
$definition->addAttribute(
140+
'div',
141+
'drawio-diagram',
142+
'Number',
143+
);
137144
}
138145

139146
public function purify(string $html): string

composer.lock

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Entity/PageContentFilteringTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ public function test_allow_list_style_filtering()
463463
'<div style="position:absolute;left:0;color:#00FFEE;">Hello!</div>' => '<div style="color:#00FFEE;">Hello!</div>',
464464
'<div style="background:#FF0000;left:0;color:#00FFEE;">Hello!</div>' => '<div style="background:#FF0000;color:#00FFEE;">Hello!</div>',
465465
'<div style="color:#00FFEE;">Hello!<style>testinghello!</style></div>' => '<div style="color:#00FFEE;">Hello!</div>',
466+
'<div drawio-diagram="5332" another-attr="cat">Hello!</div>' => '<div drawio-diagram="5332">Hello!</div>',
466467
];
467468

468469
config()->set('app.content_filtering', 'a');

0 commit comments

Comments
 (0)