Skip to content

Commit ae23fc8

Browse files
javiereguiluzfabpot
authored andcommitted
[HtmlSanitizer] Some minor changes in the config API
1 parent ab5dcb7 commit ae23fc8

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

HtmlSanitizerConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function __construct()
105105
* All scripts will be removed but the output may still contain other dangerous
106106
* behaviors like CSS injection (click-jacking), CSS expressions, ...
107107
*/
108-
public function allowAllStaticElements(): static
108+
public function allowStaticElements(): static
109109
{
110110
$elements = array_merge(
111111
array_keys(W3CReference::HEAD_ELEMENTS),

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $config = (new HtmlSanitizerConfig())
2222
// standard. All scripts will be removed but the output may still contain
2323
// other dangerous behaviors like CSS injection (click-jacking), CSS
2424
// expressions, ...
25-
->allowAllStaticElements()
25+
->allowStaticElements()
2626

2727
// Allow the "div" element and no attribute can be on it
2828
->allowElement('div')

Tests/HtmlSanitizerAllTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ private function createSanitizer(): HtmlSanitizer
2121
{
2222
return new HtmlSanitizer(
2323
(new HtmlSanitizerConfig())
24-
->allowAllStaticElements()
24+
->allowStaticElements()
2525
->allowLinkHosts(['trusted.com', 'external.com'])
2626
->allowMediaHosts(['trusted.com', 'external.com'])
2727
->allowRelativeLinks()

TextSanitizer/StringSanitizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class StringSanitizer
2626
// """ is shorter than """
2727
'"',
2828

29-
// Fix several potential issues in how browsers intepret attributes values
29+
// Fix several potential issues in how browsers interpret attributes values
3030
'+',
3131
'=',
3232
'@',

Visitor/DomVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ final class DomVisitor
4747
private array $elementsConfig;
4848

4949
/**
50-
* Registry of attributes to forcefuly set on nodes, index by element and attribute.
50+
* Registry of attributes to forcefully set on nodes, index by element and attribute.
5151
*
5252
* @var array<string, array<string, string>>
5353
*/

0 commit comments

Comments
 (0)