Skip to content

[HtmlSanitizer] Fix method names #21216

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
Jul 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions html_sanitizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -819,16 +819,16 @@ URLs of ``<a>`` elements:
(new HtmlSanitizerConfig())
// if `true`, all URLs using the `http://` scheme will be converted to
// use the `https://` scheme instead. `http` still needs to be
// allowed in `allowedLinkSchemes`
// allowed in `allowLinkSchemes`
->forceHttpsUrls()

// specifies the allowed URL schemes. If the URL has a different scheme, the
// attribute will be dropped
->allowedLinkSchemes(['http', 'https', 'mailto'])
->allowLinkSchemes(['http', 'https', 'mailto'])

// specifies the allowed hosts, the attribute will be dropped if the
// URL contains a different host which is not a subdomain of the allowed host
->allowedLinkHosts(['symfony.com']) // Also allows any subdomain (i.e. www.symfony.com)
->allowLinkHosts(['symfony.com']) // Also allows any subdomain (i.e. www.symfony.com)

// whether to allow relative links (i.e. URLs without scheme and host)
->allowRelativeLinks()
Expand Down Expand Up @@ -938,16 +938,16 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
(new HtmlSanitizerConfig())
// if `true`, all URLs using the `http://` scheme will be converted to
// use the `https://` scheme instead. `http` still needs to be
// allowed in `allowedMediaSchemes`
// allowed in `allowMediaSchemes`
->forceHttpsUrls()

// specifies the allowed URL schemes. If the URL has a different scheme, the
// attribute will be dropped
->allowedMediaSchemes(['http', 'https', 'mailto'])
->allowMediaSchemes(['http', 'https', 'mailto'])

// specifies the allowed hosts, the attribute will be dropped if the URL
// contains a different host which is not a subdomain of the allowed host
->allowedMediaHosts(['symfony.com']) // Also allows any subdomain (i.e. www.symfony.com)
->allowMediaHosts(['symfony.com']) // Also allows any subdomain (i.e. www.symfony.com)

// whether to allow relative URLs (i.e. URLs without scheme and host)
->allowRelativeMedias()
Expand Down