@@ -731,8 +731,9 @@ URLs of ``<a>`` elements:
731
731
allowed_link_schemes : ['http', 'https', 'mailto']
732
732
733
733
# 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']
736
737
737
738
# whether to allow relative links (i.e. URLs without scheme and host)
738
739
allow_relative_links : true
@@ -765,8 +766,8 @@ URLs of ``<a>`` elements:
765
766
<allowed-link-scheme >mailto</allowed-link-scheme >
766
767
767
768
<!-- 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. -->
770
771
<allowed-link-host >symfony.com</allowed-link-host >
771
772
</framework : html-sanitizer >
772
773
</framework : config >
@@ -790,8 +791,9 @@ URLs of ``<a>`` elements:
790
791
->allowedLinkSchemes(['http', 'https', 'mailto'])
791
792
792
793
// 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')
795
797
796
798
// whether to allow relative links (i.e. URLs without scheme and host)
797
799
->allowRelativeLinks(true)
0 commit comments