@@ -730,8 +730,8 @@ URLs of ``<a>`` elements:
730
730
allowed_link_schemes : ['http', 'https', 'mailto']
731
731
732
732
# specifies the allowed hosts, the attribute will be dropped if the
733
- # URL contains a different host
734
- allowed_link_hosts : ['symfony.com']
733
+ # URL contains a different host which is not a subdomain of the allowed host
734
+ allowed_link_hosts : ['symfony.com'] # also allows any subdomain (i.e. www.symfony.com)
735
735
736
736
# whether to allow relative links (i.e. URLs without scheme and host)
737
737
allow_relative_links : true
@@ -763,7 +763,8 @@ URLs of ``<a>`` elements:
763
763
<allowed-link-scheme >mailto</allowed-link-scheme >
764
764
765
765
<!-- specifies the allowed hosts, the attribute will be dropped if the
766
- URL contains a different host -->
766
+ URL contains a different host which is not a subdomain of the allowed host
767
+ Also allows any subdomain (i.e. www.symfony.com) -->
767
768
<allowed-link-host >symfony.com</allowed-link-host >
768
769
</framework : html-sanitizer >
769
770
</framework : config >
@@ -786,8 +787,8 @@ URLs of ``<a>`` elements:
786
787
->allowedLinkSchemes(['http', 'https', 'mailto'])
787
788
788
789
// specifies the allowed hosts, the attribute will be dropped if the
789
- // URL contains a different host
790
- ->allowedLinkHost('symfony.com')
790
+ // URL contains a different host which is not a subdomain of the allowed host
791
+ ->allowedLinkHost('symfony.com') // Also allows any subdomain (i.e. www.symfony.com)
791
792
792
793
// whether to allow relative links (i.e. URLs without scheme and host)
793
794
->allowRelativeLinks(true)
@@ -810,8 +811,8 @@ URLs of ``<a>`` elements:
810
811
->allowedLinkSchemes(['http', 'https', 'mailto'])
811
812
812
813
// specifies the allowed hosts, the attribute will be dropped if the
813
- // URL contains a different host
814
- ->allowedLinkHosts(['symfony.com'])
814
+ // URL contains a different host which is not a subdomain of the allowed host
815
+ ->allowedLinkHosts(['symfony.com']) // Also allows any subdomain (i.e. www.symfony.com)
815
816
816
817
// whether to allow relative links (i.e. URLs without scheme and host)
817
818
->allowRelativeLinks()
@@ -844,8 +845,8 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
844
845
allowed_media_schemes : ['http', 'https', 'mailto']
845
846
846
847
# specifies the allowed hosts, the attribute will be dropped if the URL
847
- # contains a different host
848
- allowed_media_hosts : ['symfony.com']
848
+ # contains a different host which is not a subdomain of the allowed host
849
+ allowed_media_hosts : ['symfony.com'] # Also allows any subdomain (i.e. www.symfony.com)
849
850
850
851
# whether to allow relative URLs (i.e. URLs without scheme and host)
851
852
allow_relative_medias : true
@@ -877,7 +878,8 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
877
878
<allowed-media-scheme >mailto</allowed-media-scheme >
878
879
879
880
<!-- specifies the allowed hosts, the attribute will be dropped if the URL
880
- contains a different host -->
881
+ contains a different host which is not a subdomain of the allowed host.
882
+ Also allows any subdomain (i.e. www.symfony.com) -->
881
883
<allowed-media-host >symfony.com</allowed-media-host >
882
884
</framework : html-sanitizer >
883
885
</framework : config >
@@ -900,8 +902,8 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
900
902
->allowedMediaSchemes(['http', 'https', 'mailto'])
901
903
902
904
// specifies the allowed hosts, the attribute will be dropped if the URL
903
- // contains a different host
904
- ->allowedMediaHost('symfony.com')
905
+ // contains a different host which is not a subdomain of the allowed host
906
+ ->allowedMediaHost('symfony.com') // Also allows any subdomain (i.e. www.symfony.com)
905
907
906
908
// whether to allow relative URLs (i.e. URLs without scheme and host)
907
909
->allowRelativeMedias(true)
@@ -924,8 +926,8 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
924
926
->allowedMediaSchemes(['http', 'https', 'mailto'])
925
927
926
928
// specifies the allowed hosts, the attribute will be dropped if the URL
927
- // contains a different host
928
- ->allowedMediaHosts(['symfony.com'])
929
+ // contains a different host which is not a subdomain of the allowed host
930
+ ->allowedMediaHosts(['symfony.com']) // Also allows any subdomain (i.e. www.symfony.com)
929
931
930
932
// whether to allow relative URLs (i.e. URLs without scheme and host)
931
933
->allowRelativeMedias()
0 commit comments