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

Skip to content

Commit f069b06

Browse files
committed
WIP
1 parent be69d17 commit f069b06

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Symfony/Component/HtmlSanitizer/Parser/MastermindsParser.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020
*/
2121
final class MastermindsParser implements ParserInterface
2222
{
23-
public function __construct(private ?HTML5 $parser = null)
23+
public function __construct(private array $defaultOptions = [])
2424
{
2525
}
2626

2727
public function parse(string $html): ?\DOMNode
2828
{
29-
$this->parser ??= new HTML5();
30-
31-
return $this->parser->loadHTMLFragment($html);
29+
return (new HTML5($this->defaultOptions))->loadHTMLFragment($html);
3230
}
3331
}

src/Symfony/Component/HtmlSanitizer/TextSanitizer/UrlSanitizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static function parse(string $url): ?array
102102

103103
private static function isHostlessScheme(?string $scheme): bool
104104
{
105-
return \in_array($scheme, ['data', 'mailto', 'tel', 'file', 'view-source', 'maps', 'chrome', 'blob'], true);
105+
return \in_array($scheme, ['blob', 'chrome', 'data', 'file', 'geo', 'mailto', 'maps', 'tel', 'view-source'], true);
106106
}
107107

108108
private static function isAllowedHost(?string $host, array $allowedHosts): bool

0 commit comments

Comments
 (0)