Skip to content

Commit

Permalink
Fix the handling of the html_sanitizer service for the main serializer (
Browse files Browse the repository at this point in the history
#10)

It should be an alias of the named service, instead of being a separate sanitizer instance using the same definition.
  • Loading branch information
stof authored and tgalopin committed Apr 18, 2019
1 parent daf9fb3 commit a4e2e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DependencyInjection/HtmlSanitizerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private function registerSanitizers(ContainerBuilder $container, array $sanitize

if ($name === $default) {
$container->setAlias(SanitizerInterface::class, 'html_sanitizer.'.$name);
$container->setDefinition('html_sanitizer', $definition);
$container->setAlias('html_sanitizer', 'html_sanitizer.'.$name);
}

$refMap[$name] = new ServiceClosureArgument(new Reference('html_sanitizer.'.$name));
Expand Down

0 comments on commit a4e2e60

Please sign in to comment.