Skip to content

Commit 0cdde5b

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: [Console] Prevent PHP 8.1 str_replace deprec on null [HttpKernel] Fix BackedEnumValueResolver already resolved enum value Improve DE translations for Form/Validator [Serializer] Fix ignore attribute in Xml files [Console] Escape % in command name & description from getDefault*() [WebProfilerBundle] Fix dark theme selected line highlight color & reuse css vars [Runtime] List Fulgens as backer of version 6.1 [HttpClient] List Prisma Media as backer of version 6.1 [WebProfilerBundle] normalizer and encoder can be undefined in template [Mime] Check that the path is a file in the DataPart::fromPath [Cache] do not pass null to strlen() [HtmlSanitizer][FrameworkBundle] Fix calling `allowStaticElements` when setting `allow_all_static_elements: true` [Mailer] Sort transports alphabetically [Security] Fix some phpdoc [Serializer] Get attributeContext after converting name
2 parents c3dfdd2 + d481d9f commit 0cdde5b

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2149,7 +2149,7 @@ private function addHtmlSanitizerSection(ArrayNodeDefinition $rootNode, callable
21492149
->info('Allows "safe" elements and attributes.')
21502150
->defaultFalse()
21512151
->end()
2152-
->booleanNode('allow_all_static_elements')
2152+
->booleanNode('allow_static_elements')
21532153
->info('Allows all static elements and attributes from the W3C Sanitizer API standard.')
21542154
->defaultFalse()
21552155
->end()

DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,11 +2430,11 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co
24302430
MailgunTransportFactory::class => 'mailer.transport_factory.mailgun',
24312431
MailjetTransportFactory::class => 'mailer.transport_factory.mailjet',
24322432
MandrillTransportFactory::class => 'mailer.transport_factory.mailchimp',
2433+
OhMySmtpTransportFactory::class => 'mailer.transport_factory.ohmysmtp',
24332434
PostmarkTransportFactory::class => 'mailer.transport_factory.postmark',
24342435
SendgridTransportFactory::class => 'mailer.transport_factory.sendgrid',
24352436
SendinblueTransportFactory::class => 'mailer.transport_factory.sendinblue',
24362437
SesTransportFactory::class => 'mailer.transport_factory.amazon',
2437-
OhMySmtpTransportFactory::class => 'mailer.transport_factory.ohmysmtp',
24382438
];
24392439

24402440
foreach ($classToServices as $class => $service) {
@@ -2682,8 +2682,8 @@ private function registerHtmlSanitizerConfiguration(array $config, ContainerBuil
26822682
$def->addMethodCall('allowSafeElements', [], true);
26832683
}
26842684

2685-
if ($sanitizerConfig['allow_all_static_elements']) {
2686-
$def->addMethodCall('allowAllStaticElements', [], true);
2685+
if ($sanitizerConfig['allow_static_elements']) {
2686+
$def->addMethodCall('allowStaticElements', [], true);
26872687
}
26882688

26892689
// Configures elements

Resources/config/schema/symfony-1.0.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@
845845
</xsd:sequence>
846846
<xsd:attribute name="name" type="xsd:string" use="required" />
847847
<xsd:attribute name="allow-safe-elements" type="xsd:boolean" />
848-
<xsd:attribute name="allow-all-static-elements" type="xsd:boolean" />
848+
<xsd:attribute name="allow-static-elements" type="xsd:boolean" />
849849
<xsd:attribute name="force-https-urls" type="xsd:boolean" />
850850
<xsd:attribute name="allow-relative-links" type="xsd:boolean" />
851851
<xsd:attribute name="allow-relative-medias" type="xsd:boolean" />

Tests/DependencyInjection/Fixtures/php/html_sanitizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'sanitizers' => [
77
'default' => [
88
'allow_safe_elements' => true,
9-
'allow_all_static_elements' => true,
9+
'allow_static_elements' => true,
1010
'allow_elements' => [
1111
'iframe' => 'src',
1212
'custom-tag' => ['data-attr', 'data-attr-1'],

Tests/DependencyInjection/Fixtures/xml/html_sanitizer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<html-sanitizer>
1010
<sanitizer name="default"
1111
allow-safe-elements="true"
12-
allow-all-static-elements="true"
12+
allow-static-elements="true"
1313
force-https-urls="true"
1414
allow-relative-links="true"
1515
allow-relative-medias="true"

Tests/DependencyInjection/Fixtures/yml/html_sanitizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ framework:
44
sanitizers:
55
default:
66
allow_safe_elements: true
7-
allow_all_static_elements: true
7+
allow_static_elements: true
88
allow_elements:
99
iframe: 'src'
1010
custom-tag: ['data-attr', 'data-attr-1']

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,7 @@ public function testHtmlSanitizer()
20452045
$this->assertSame(
20462046
[
20472047
['allowSafeElements', [], true],
2048-
['allowAllStaticElements', [], true],
2048+
['allowStaticElements', [], true],
20492049
['allowElement', ['iframe', 'src'], true],
20502050
['allowElement', ['custom-tag', ['data-attr', 'data-attr-1']], true],
20512051
['allowElement', ['custom-tag-2', '*'], true],

0 commit comments

Comments
 (0)