diff --git a/src/Symfony/Component/HtmlSanitizer/HtmlSanitizerConfig.php b/src/Symfony/Component/HtmlSanitizer/HtmlSanitizerConfig.php
index 4782d3dbc5d07..81a2812a5c862 100644
--- a/src/Symfony/Component/HtmlSanitizer/HtmlSanitizerConfig.php
+++ b/src/Symfony/Component/HtmlSanitizer/HtmlSanitizerConfig.php
@@ -105,7 +105,7 @@ public function __construct()
* All scripts will be removed but the output may still contain other dangerous
* behaviors like CSS injection (click-jacking), CSS expressions, ...
*/
- public function allowAllStaticElements(): static
+ public function allowStaticElements(): static
{
$elements = array_merge(
array_keys(W3CReference::HEAD_ELEMENTS),
diff --git a/src/Symfony/Component/HtmlSanitizer/README.md b/src/Symfony/Component/HtmlSanitizer/README.md
index dba14d9ab8622..12210c8a87dba 100644
--- a/src/Symfony/Component/HtmlSanitizer/README.md
+++ b/src/Symfony/Component/HtmlSanitizer/README.md
@@ -22,7 +22,7 @@ $config = (new HtmlSanitizerConfig())
// standard. All scripts will be removed but the output may still contain
// other dangerous behaviors like CSS injection (click-jacking), CSS
// expressions, ...
- ->allowAllStaticElements()
+ ->allowStaticElements()
// Allow the "div" element and no attribute can be on it
->allowElement('div')
diff --git a/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php b/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php
index b3040817245c8..7e53d8c3a3207 100644
--- a/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php
+++ b/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php
@@ -21,7 +21,7 @@ private function createSanitizer(): HtmlSanitizer
{
return new HtmlSanitizer(
(new HtmlSanitizerConfig())
- ->allowAllStaticElements()
+ ->allowStaticElements()
->allowLinkHosts(['trusted.com', 'external.com'])
->allowMediaHosts(['trusted.com', 'external.com'])
->allowRelativeLinks()
diff --git a/src/Symfony/Component/HtmlSanitizer/TextSanitizer/StringSanitizer.php b/src/Symfony/Component/HtmlSanitizer/TextSanitizer/StringSanitizer.php
index a291c622a136e..99c56469709e5 100644
--- a/src/Symfony/Component/HtmlSanitizer/TextSanitizer/StringSanitizer.php
+++ b/src/Symfony/Component/HtmlSanitizer/TextSanitizer/StringSanitizer.php
@@ -26,7 +26,7 @@ final class StringSanitizer
// """ is shorter than """
'"',
- // Fix several potential issues in how browsers intepret attributes values
+ // Fix several potential issues in how browsers interpret attributes values
'+',
'=',
'@',
diff --git a/src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php b/src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php
index 30a8f0e2bbe9b..4c2eba0c16198 100644
--- a/src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php
+++ b/src/Symfony/Component/HtmlSanitizer/Visitor/DomVisitor.php
@@ -47,7 +47,7 @@ final class DomVisitor
private array $elementsConfig;
/**
- * Registry of attributes to forcefuly set on nodes, index by element and attribute.
+ * Registry of attributes to forcefully set on nodes, index by element and attribute.
*
* @var array>
*/