@@ -731,8 +731,8 @@ 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
735
- allowed_link_hosts : ['symfony.com']
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)
736
736
737
737
# whether to allow relative links (i.e. URLs without scheme and host)
738
738
allow_relative_links : true
@@ -765,7 +765,8 @@ URLs of ``<a>`` elements:
765
765
<allowed-link-scheme >mailto</allowed-link-scheme >
766
766
767
767
<!-- specifies the allowed hosts, the attribute will be dropped if the
768
- URL contains a different host -->
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
770
<allowed-link-host >symfony.com</allowed-link-host >
770
771
</framework : html-sanitizer >
771
772
</framework : config >
@@ -789,8 +790,8 @@ URLs of ``<a>`` elements:
789
790
->allowedLinkSchemes(['http', 'https', 'mailto'])
790
791
791
792
// specifies the allowed hosts, the attribute will be dropped if the
792
- // URL contains a different host
793
- ->allowedLinkHost('symfony.com')
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
795
795
796
// whether to allow relative links (i.e. URLs without scheme and host)
796
797
->allowRelativeLinks(true)
@@ -814,8 +815,8 @@ URLs of ``<a>`` elements:
814
815
->allowedLinkSchemes(['http', 'https', 'mailto'])
815
816
816
817
// specifies the allowed hosts, the attribute will be dropped if the
817
- // URL contains a different host
818
- ->allowedLinkHosts(['symfony.com'])
818
+ // URL contains a different host which is not a subdomain of the allowed host
819
+ ->allowedLinkHosts(['symfony.com']) // Also allows any subdomain (i.e. www.symfony.com)
819
820
820
821
// whether to allow relative links (i.e. URLs without scheme and host)
821
822
->allowRelativeLinks()
@@ -849,8 +850,8 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
849
850
allowed_media_schemes : ['http', 'https', 'mailto']
850
851
851
852
# specifies the allowed hosts, the attribute will be dropped if the URL
852
- # contains a different host
853
- allowed_media_hosts : ['symfony.com']
853
+ # contains a different host which is not a subdomain of the allowed host
854
+ allowed_media_hosts : ['symfony.com'] # Also allows any subdomain (i.e. www.symfony.com)
854
855
855
856
# whether to allow relative URLs (i.e. URLs without scheme and host)
856
857
allow_relative_medias : true
@@ -883,7 +884,8 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
883
884
<allowed-media-scheme >mailto</allowed-media-scheme >
884
885
885
886
<!-- specifies the allowed hosts, the attribute will be dropped if the URL
886
- contains a different host -->
887
+ contains a different host which is not a subdomain of the allowed host.
888
+ Also allows any subdomain (i.e. www.symfony.com) -->
887
889
<allowed-media-host >symfony.com</allowed-media-host >
888
890
</framework : html-sanitizer >
889
891
</framework : config >
@@ -907,8 +909,8 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
907
909
->allowedMediaSchemes(['http', 'https', 'mailto'])
908
910
909
911
// specifies the allowed hosts, the attribute will be dropped if the URL
910
- // contains a different host
911
- ->allowedMediaHost('symfony.com')
912
+ // contains a different host which is not a subdomain of the allowed host
913
+ ->allowedMediaHost('symfony.com') // Also allows any subdomain (i.e. www.symfony.com)
912
914
913
915
// whether to allow relative URLs (i.e. URLs without scheme and host)
914
916
->allowRelativeMedias(true)
@@ -932,8 +934,8 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
932
934
->allowedMediaSchemes(['http', 'https', 'mailto'])
933
935
934
936
// specifies the allowed hosts, the attribute will be dropped if the URL
935
- // contains a different host
936
- ->allowedMediaHosts(['symfony.com'])
937
+ // contains a different host which is not a subdomain of the allowed host
938
+ ->allowedMediaHosts(['symfony.com']) // Also allows any subdomain (i.e. www.symfony.com)
937
939
938
940
// whether to allow relative URLs (i.e. URLs without scheme and host)
939
941
->allowRelativeMedias()
0 commit comments