Skip to content

Commit 55f8aad

Browse files
committed
Minor tweaks
1 parent 7d61be4 commit 55f8aad

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

html_sanitizer.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,9 @@ URLs of ``<a>`` elements:
731731
allowed_link_schemes: ['http', 'https', 'mailto']
732732
733733
# specifies the allowed hosts, the attribute will be dropped if the
734-
# URL contains a different host which is not a subdomain of the allowed host
735-
allowed_link_hosts: ['symfony.com'] # also allows any subdomain (i.e. www.symfony.com)
734+
# URL contains a different host. Subdomains are allowed: e.g. the following
735+
# config would also allow 'www.symfony.com', 'live.symfony.com', etc.
736+
allowed_link_hosts: ['symfony.com']
736737
737738
# whether to allow relative links (i.e. URLs without scheme and host)
738739
allow_relative_links: true
@@ -765,8 +766,8 @@ URLs of ``<a>`` elements:
765766
<allowed-link-scheme>mailto</allowed-link-scheme>
766767
767768
<!-- specifies the allowed hosts, the attribute will be dropped if the
768-
URL contains a different host which is not a subdomain of the allowed host
769-
Also allows any subdomain (i.e. www.symfony.com) -->
769+
URL contains a different host. Subdomains are allowed: e.g. the following
770+
config would also allow 'www.symfony.com', 'live.symfony.com', etc. -->
770771
<allowed-link-host>symfony.com</allowed-link-host>
771772
</framework:html-sanitizer>
772773
</framework:config>
@@ -790,8 +791,9 @@ URLs of ``<a>`` elements:
790791
->allowedLinkSchemes(['http', 'https', 'mailto'])
791792
792793
// specifies the allowed hosts, the attribute will be dropped if the
793-
// URL contains a different host which is not a subdomain of the allowed host
794-
->allowedLinkHost('symfony.com') // Also allows any subdomain (i.e. www.symfony.com)
794+
// URL contains a different host. Subdomains are allowed: e.g. the following
795+
// config would also allow 'www.symfony.com', 'live.symfony.com', etc.
796+
->allowedLinkHost('symfony.com')
795797
796798
// whether to allow relative links (i.e. URLs without scheme and host)
797799
->allowRelativeLinks(true)

0 commit comments

Comments
 (0)