@@ -721,8 +721,9 @@ URLs of ``<a>`` elements:
721
721
app.post_sanitizer :
722
722
# ...
723
723
724
- # if `true`, all URLs will be forced using the `https://` scheme (instead
725
- # of e.g. `http://` or `mailto:`)
724
+ # if `true`, all URLs using the `http://` scheme will be converted to
725
+ # using the `https://` scheme instead. `http` still needs to be allowed
726
+ # in `allowed_link_schemes`
726
727
force_https_urls : true
727
728
728
729
# specifies the allowed URL schemes. If the URL has a different scheme, the
@@ -748,8 +749,9 @@ URLs of ``<a>`` elements:
748
749
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
749
750
750
751
<framework : config >
751
- <!-- force-https-urls: if `true`, all URLs will be forced using the `https://`
752
- scheme (instead of e.g. `http://` or `mailto:`) -->
752
+ <!-- force-https-urls: if `true`, all URLs using the `http://` scheme will be
753
+ converted to using the `https://` scheme instead.
754
+ `http` still needs to be allowed in `allowed-link-scheme` -->
753
755
<!-- allow-relative-links: whether to allow relative links (i.e. URLs without
754
756
scheme and host) -->
755
757
<framework : html-sanitizer
@@ -777,8 +779,9 @@ URLs of ``<a>`` elements:
777
779
return static function (FrameworkConfig $framework): void {
778
780
$framework->htmlSanitizer()
779
8000
781
->sanitizer('app.post_sanitizer')
780
- // if `true`, all URLs will be forced using the `https://` scheme (instead
781
- // of e.g. `http://` or `mailto:`)
782
+ // if `true`, all URLs using the `http://` scheme will be converted to
783
+ // using the `https://` scheme instead. `http` still needs to be
784
+ // allowed in `allowedLinkSchemes`
782
785
->forceHttpsUrls(true)
783
786
784
787
// specifies the allowed URL schemes. If the URL has a different scheme, the
@@ -801,8 +804,9 @@ URLs of ``<a>`` elements:
801
804
802
805
$postSanitizer = new HtmlSanitizer(
803
806
(new HtmlSanitizerConfig())
804
- // if `true`, all URLs will be forced using the `https://` scheme (instead
805
- // of e.g. `http://` or `mailto:`)
807
+ // if `true`, all URLs using the `http://` scheme will be converted to
808
+ // using the `https://` scheme instead. `http` still needs to be
809
+ // allowed in `allowedLinkSchemes`
806
810
->forceHttpsUrls()
807
811
808
812
// specifies the allowed URL schemes. If the URL has a different scheme, the
@@ -835,8 +839,9 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
835
839
app.post_sanitizer :
836
840
# ...
837
841
838
- # if `true`, all URLs will be forced using the `https://` scheme (instead
839
- # of e.g. `http://` or `data:`)
842
+ # if `true`, all URLs using the `http://` scheme will be converted to
843
+ # using the `https://` scheme instead. `http` still needs to be allowed
844
+ # in `allowed_media_schemes`
840
845
force_https_urls : true
841
846
842
847
# specifies the allowed URL schemes. If the URL has a different scheme, the
@@ -862,8 +867,9 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
862
867
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
863
868
864
869
<framework : config >
865
- <!-- force-https-urls: if `true`, all URLs will be forced using the `https://`
866
- scheme (instead of e.g. `http://` or `data:`) -->
870
+ <!-- force-https-urls: if `true`, all URLs using the `http://` scheme will be
871
+ converted to using the `https://` scheme instead. `http`
872
+ still needs to be allowed in `allowed-media-scheme` -->
867
873
<!-- allow-relative-medias: whether to allow relative URLs (i.e. URLs without
868
874
scheme and host) -->
869
875
<framework : html-sanitizer
@@ -891,8 +897,9 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
891
897
return static function (FrameworkConfig $framework): void {
892
898
$framework->htmlSanitizer()
893
899
->sanitizer('app.post_sanitizer')
894
- // if `true`, all URLs will be forced using the `https://` scheme (instead
895
- // of e.g. `http://` or `data:`)
900
+ // if `true`, all URLs using the `http://` scheme will be converted to
901
+ // using the `https://` scheme instead. `http` still needs to be
902
+ // allowed in `allowedMediaSchemes`
896
903
->forceHttpsUrls(true)
897
904
898
905
// specifies the allowed URL schemes. If the URL has a different scheme, the
@@ -915,8 +922,9 @@ the HTML sanitizer: ``src``, ``href``, ``lowsrc``, ``background`` and ``ping``.
915
922
916
923
$postSanitizer = new HtmlSanitizer(
917
924
(new HtmlSanitizerConfig())
918
- // if `true`, all URLs will be forced using the `https://` scheme (instead
919
- // of e.g. `http://` or `data:`)
925
+ // if `true`, all URLs using the `http://` scheme will be converted to
926
+ // using the `https://` scheme instead. `http` still needs to be
927
+ // allowed in `allowedMediaSchemes`
920
928
->forceHttpsUrls()
921
929
922
930
// specifies the allowed URL schemes. If the URL has a different scheme, the
0 commit comments