Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HtmlSanitizer] Fix wrong method name #16838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2022

Conversation

norkunas
Copy link
Contributor

@norkunas norkunas commented Jun 1, 2022

@OskarStark
Copy link
Contributor

friendly ping @tgalopin

@norkunas norkunas force-pushed the fix-sanitizer-samples branch from 2807dfa to c78c78f Compare June 1, 2022 11:53
@OskarStark OskarStark added this to the 6.1 milestone Jun 1, 2022
@OskarStark OskarStark added the Waiting Code Merge Docs for features pending to be merged label Jun 1, 2022
@carsonbot carsonbot modified the milestones: 6.1, next Jun 1, 2022
chalasr added a commit to symfony/symfony that referenced this pull request Jun 1, 2022
…lements` when setting `allow_all_static_elements: true` (norkunas)

This PR was merged into the 6.1 branch.

Discussion
----------

[FrameworkBundle][HtmlSanitizer] Fix calling `allowStaticElements` when setting `allow_all_static_elements: true`

| Q             | A
| ------------- | ---
| Branch?       | 6.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | [symfony/symfony-docs#... <!-- required for new features -->](symfony/symfony-docs#16838)

```
Symfony\Component\ErrorHandler\Error\UndefinedMethodError {#21964
  #message: """
    Attempted to call an undefined method named "allowAllStaticElements" of class "Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig".\n
    Did you mean to call e.g. "allowSafeElements" or "allowStaticElements"?
    """
  #code: 0
  #file: "./var/cache/dev/ContainerXJ5lfcV/getHtmlSanitizer_Sanitizer_PostContent_SanitizerService.php"
  #line: 25
  trace: {
    ./var/cache/dev/ContainerXJ5lfcV/getHtmlSanitizer_Sanitizer_PostContent_SanitizerService.php:25 {
      ContainerXJ5lfcV\getHtmlSanitizer_Sanitizer_PostContent_SanitizerService::do($container, $lazyLoad = true)
      › $a = new \Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig();
      › $a = $a->allowAllStaticElements();
      › $a = $a->forceHttpsUrls(false);
    }
    ./var/cache/dev/ContainerXJ5lfcV/App_KernelDevDebugContainer.php:981 { …}
    ./var/cache/dev/ContainerXJ5lfcV/getTestCommandService.php:23 { …}
    ./var/cache/dev/ContainerXJ5lfcV/App_KernelDevDebugContainer.php:981 { …}
    ./vendor/symfony/dependency-injection/Container.php:383 { …}
    ./vendor/symfony/dependency-injection/Argument/ServiceLocator.php:43 { …}
    ./vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:46 { …}
    ./vendor/symfony/console/Application.php:570 { …}
    ./vendor/symfony/console/Application.php:657 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:114 { …}
    ./vendor/symfony/console/Application.php:259 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:80 { …}
    ./vendor/symfony/console/Application.php:171 { …}
    ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54 { …}
    ./vendor/autoload_runtime.php:29 { …}
    ./bin/console:15 { …}
  }
}
```

Commits
-------

98a4b8a [HtmlSanitizer][FrameworkBundle] Fix calling `allowStaticElements` when setting `allow_all_static_elements: true`
@javiereguiluz javiereguiluz removed the Waiting Code Merge Docs for features pending to be merged label Jun 2, 2022
@javiereguiluz
Copy link
Member

Thank you Tomas.

@javiereguiluz javiereguiluz merged commit 2c03f2d into symfony:6.1 Jun 2, 2022
@norkunas norkunas deleted the fix-sanitizer-samples branch June 2, 2022 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants