Browse code

use HTTPS whenever possible

Fabien Potencier authored on 20/04/2018 06:03:03
Showing 33 changed files
... ...
@@ -543,7 +543,7 @@ to host all the specific tags and filters you want to add to Twig.
543 543
 .. note::
544 544
 
545 545
     Before writing your own extensions, have a look at the Twig official
546
-    extension repository: http://github.com/twigphp/Twig-extensions.
546
+    extension repository: https://github.com/twigphp/Twig-extensions.
547 547
 
548 548
 An extension is a class that implements the following interface::
549 549
 
... ...
@@ -957,6 +957,6 @@ Testing the node visitors can be complex, so extend your test cases from
957 957
 ``Twig_Test_NodeTestCase``. Examples can be found in the Twig repository
958 958
 `tests/Twig/Node`_ directory.
959 959
 
960
-.. _`rot13`:                   http://www.php.net/manual/en/function.str-rot13.php
960
+.. _`rot13`:                   https://secure.php.net/manual/en/function.str-rot13.php
961 961
 .. _`tests/Twig/Fixtures`:     https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Fixtures
962 962
 .. _`tests/Twig/Node`:         https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Node
... ...
@@ -529,7 +529,7 @@ to host all the specific tags and filters you want to add to Twig.
529 529
 .. note::
530 530
 
531 531
     Before writing your own extensions, have a look at the Twig official
532
-    extension repository: http://github.com/twigphp/Twig-extensions.
532
+    extension repository: https://github.com/twigphp/Twig-extensions.
533 533
 
534 534
 An extension is a class that implements the following interface::
535 535
 
... ...
@@ -879,7 +879,7 @@ Testing the node visitors can be complex, so extend your test cases from
879 879
 ``Twig_Test_NodeTestCase``. Examples can be found in the Twig repository
880 880
 `tests/Twig/Node`_ directory.
881 881
 
882
-.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
883
-.. _`rot13`:                   http://www.php.net/manual/en/function.str-rot13.php
882
+.. _`spl_autoload_register()`: https://secure.php.net/spl_autoload_register
883
+.. _`rot13`:                   https://secure.php.net/manual/en/function.str-rot13.php
884 884
 .. _`tests/Twig/Fixtures`:     https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Fixtures
885 885
 .. _`tests/Twig/Node`:         https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Node
... ...
@@ -15,4 +15,4 @@ The ``abs`` filter returns the absolute value.
15 15
 
16 16
     Internally, Twig uses the PHP `abs`_ function.
17 17
 
18
-.. _`abs`: http://php.net/abs
18
+.. _`abs`: https://secure.php.net/abs
... ...
@@ -24,5 +24,5 @@ Arguments
24 24
 * ``to``:   The output charset
25 25
 * ``from``: The input charset
26 26
 
27
-.. _`iconv`:    http://php.net/iconv
28
-.. _`mbstring`: http://php.net/mbstring
27
+.. _`iconv`:    https://secure.php.net/iconv
28
+.. _`mbstring`: https://secure.php.net/mbstring
... ...
@@ -93,8 +93,8 @@ Arguments
93 93
 * ``format``:   The date format
94 94
 * ``timezone``: The date timezone
95 95
 
96
-.. _`strtotime`:            http://www.php.net/strtotime
97
-.. _`DateTime`:             http://www.php.net/DateTime
98
-.. _`DateInterval`:         http://www.php.net/DateInterval
99
-.. _`date`:                 http://www.php.net/date
100
-.. _`DateInterval::format`: http://www.php.net/DateInterval.format
96
+.. _`strtotime`:            https://secure.php.net/strtotime
97
+.. _`DateTime`:             https://secure.php.net/DateTime
98
+.. _`DateInterval`:         https://secure.php.net/DateInterval
99
+.. _`date`:                 https://secure.php.net/date
100
+.. _`DateInterval::format`: https://secure.php.net/DateInterval.format
... ...
@@ -19,5 +19,5 @@ Arguments
19 19
 
20 20
 * ``modifier``: The modifier
21 21
 
22
-.. _`strtotime`: http://www.php.net/strtotime
23
-.. _`DateTime`:  http://www.php.net/DateTime
22
+.. _`strtotime`: https://secure.php.net/strtotime
23
+.. _`DateTime`:  https://secure.php.net/DateTime
... ...
@@ -116,4 +116,4 @@ Arguments
116 116
 * ``strategy``: The escaping strategy
117 117
 * ``charset``:  The string charset
118 118
 
119
-.. _`htmlspecialchars`: http://php.net/htmlspecialchars
119
+.. _`htmlspecialchars`: https://secure.php.net/htmlspecialchars
... ...
@@ -22,4 +22,4 @@ a string:
22 22
 
23 23
     It also works with objects implementing the `Traversable`_ interface.
24 24
 
25
-.. _`Traversable`: http://php.net/manual/en/class.traversable.php
25
+.. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
... ...
@@ -11,6 +11,6 @@ The ``format`` filter formats a given string by replacing the placeholders
11 11
     {# outputs I like foo and bar
12 12
        if the foo parameter equals to the foo string. #}
13 13
 
14
-.. _`sprintf`: http://www.php.net/sprintf
14
+.. _`sprintf`: https://secure.php.net/sprintf
15 15
 
16 16
 .. seealso:: :doc:`replace<replace>`
... ...
@@ -17,5 +17,5 @@ Arguments
17 17
 * ``options``: A bitmask of `json_encode options`_ (``{{
18 18
   data|json_encode(constant('JSON_PRETTY_PRINT')) }}``)
19 19
 
20
-.. _`json_encode`: http://php.net/json_encode
21
-.. _`json_encode options`: http://www.php.net/manual/en/json.constants.php
20
+.. _`json_encode`: https://secure.php.net/json_encode
21
+.. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php
... ...
@@ -22,4 +22,4 @@ a string:
22 22
 
23 23
     It also works with objects implementing the `Traversable`_ interface.
24 24
 
25
-.. _`Traversable`: http://php.net/manual/en/class.traversable.php
25
+.. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
... ...
@@ -45,4 +45,4 @@ overridden.
45 45
     Internally, Twig uses the PHP `array_merge`_ function. It supports
46 46
     Traversable objects by transforming those to arrays.
47 47
 
48
-.. _`array_merge`: http://php.net/array_merge
48
+.. _`array_merge`: https://secure.php.net/array_merge
... ...
@@ -53,4 +53,4 @@ Arguments
53 53
 * ``decimal_point``: The character(s) to use for the decimal point
54 54
 * ``thousand_sep``:   The character(s) to use for the thousands separator
55 55
 
56
-.. _`number_format`: http://php.net/number_format
56
+.. _`number_format`: https://secure.php.net/number_format
... ...
@@ -44,4 +44,4 @@ Arguments
44 44
 
45 45
 * ``preserve_keys``: Preserve keys when reversing a mapping or a sequence.
46 46
 
47
-.. _`Traversable`: http://php.net/Traversable
47
+.. _`Traversable`: https://secure.php.net/Traversable
... ...
@@ -65,7 +65,7 @@ Arguments
65 65
 * ``length``:        The size of the slice
66 66
 * ``preserve_keys``: Whether to preserve key or not (when the input is an array)
67 67
 
68
-.. _`Traversable`: http://php.net/manual/en/class.traversable.php
69
-.. _`array_slice`: http://php.net/array_slice
70
-.. _`mb_substr` :  http://php.net/mb-substr
71
-.. _`substr`:      http://php.net/substr
68
+.. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
69
+.. _`array_slice`: https://secure.php.net/array_slice
70
+.. _`mb_substr` :  https://secure.php.net/mb-substr
71
+.. _`substr`:      https://secure.php.net/substr
... ...
@@ -15,4 +15,4 @@ The ``sort`` filter sorts an array:
15 15
     association. It supports Traversable objects by transforming
16 16
     those to arrays.
17 17
 
18
-.. _`asort`: http://php.net/asort
18
+.. _`asort`: https://secure.php.net/asort
... ...
@@ -49,5 +49,5 @@ Arguments
49 49
 * ``delimiter``: The delimiter
50 50
 * ``limit``:     The limit argument
51 51
 
52
-.. _`explode`:   http://php.net/explode
53
-.. _`str_split`: http://php.net/str_split
52
+.. _`explode`:   https://secure.php.net/explode
53
+.. _`str_split`: https://secure.php.net/str_split
... ...
@@ -26,4 +26,4 @@ Arguments
26 26
 
27 27
 * ``allowable_tags``: Tags which should not be stripped
28 28
 
29
-.. _`strip_tags`: http://php.net/strip_tags
29
+.. _`strip_tags`: https://secure.php.net/strip_tags
... ...
@@ -40,6 +40,6 @@ Arguments
40 40
 * ``side``: The default is to strip from the left and the right (`both`) sides, but `left`
41 41
   and `right` will strip from either the left side or right side only
42 42
 
43
-.. _`trim`: http://php.net/trim
44
-.. _`ltrim`: http://php.net/ltrim
45
-.. _`rtrim`: http://php.net/rtrim
43
+.. _`trim`: https://secure.php.net/trim
44
+.. _`ltrim`: https://secure.php.net/ltrim
45
+.. _`rtrim`: https://secure.php.net/rtrim
... ...
@@ -29,6 +29,6 @@ or an array as query string:
29 29
     that as of Twig 1.16.0, ``urlencode`` **always** uses ``rawurlencode`` (the
30 30
     ``raw`` argument was removed.)
31 31
 
32
-.. _`urlencode`:        http://php.net/urlencode
33
-.. _`rawurlencode`:     http://php.net/rawurlencode
34
-.. _`http_build_query`: http://php.net/http_build_query
32
+.. _`urlencode`:        https://secure.php.net/urlencode
33
+.. _`rawurlencode`:     https://secure.php.net/rawurlencode
34
+.. _`http_build_query`: https://secure.php.net/http_build_query
... ...
@@ -52,4 +52,4 @@ Arguments
52 52
 * ``date``:     The date
53 53
 * ``timezone``: The timezone
54 54
 
55
-.. _`date and time formats`: http://php.net/manual/en/datetime.formats.php
55
+.. _`date and time formats`: https://secure.php.net/manual/en/datetime.formats.php
... ...
@@ -65,5 +65,5 @@ Arguments
65 65
 
66 66
 * ``context``: The context to dump
67 67
 
68
-.. _`XDebug`:   http://xdebug.org/docs/display
69
-.. _`var_dump`: http://php.net/var_dump
68
+.. _`XDebug`:   https://xdebug.org/docs/display
69
+.. _`var_dump`: https://secure.php.net/var_dump
... ...
@@ -26,4 +26,4 @@ Arguments
26 26
 
27 27
 * ``values``: The values
28 28
 
29
-.. _`mt_rand`: http://php.net/mt_rand
29
+.. _`mt_rand`: https://secure.php.net/mt_rand
... ...
@@ -55,4 +55,4 @@ Arguments
55 55
 * ``high``: The highest possible value of the sequence.
56 56
 * ``step``: The increment between elements of the sequence.
57 57
 
58
-.. _`range`: http://php.net/range
58
+.. _`range`: https://secure.php.net/range
... ...
@@ -113,4 +113,4 @@ PHP code but only provides an optimized version of the
113 113
 .. _`download page`:     https://github.com/twigphp/Twig/tags
114 114
 .. _`Composer`:          https://getcomposer.org/download/
115 115
 .. _`PHP documentation`: https://wiki.php.net/internals/windows/stepbystepbuild
116
-.. _`Zend Server FAQ`:   http://www.zend.com/en/products/server/faq#faqD6
116
+.. _`Zend Server FAQ`:   https://www.zend.com/en/products/server/faq#faqD6
... ...
@@ -150,7 +150,7 @@ parent's full, unambiguous template path in the extends tag:
150 150
 .. note::
151 151
 
152 152
     This recipe was inspired by the following Django wiki page:
153
-    http://code.djangoproject.com/wiki/ExtendingTemplates
153
+    https://code.djangoproject.com/wiki/ExtendingTemplates
154 154
 
155 155
 Customizing the Syntax
156 156
 ----------------------
... ...
@@ -565,4 +565,4 @@ include in your templates:
565 565
             'tag_variable' => array('{[', ']}'),
566 566
         )));
567 567
 
568
-.. _callback: http://www.php.net/manual/en/function.is-callable.php
568
+.. _callback: https://secure.php.net/manual/en/function.is-callable.php
... ...
@@ -14,4 +14,4 @@ The ``flush`` tag tells Twig to flush the output buffer:
14 14
 
15 15
     Internally, Twig uses the PHP `flush`_ function.
16 16
 
17
-.. _`flush`: http://php.net/flush
17
+.. _`flush`: https://secure.php.net/flush
... ...
@@ -898,12 +898,12 @@ Extension<creating_extensions>` chapter.
898 898
 .. _`Twig syntax plugin`:         http://plugins.netbeans.org/plugin/37069/php-twig
899 899
 .. _`Twig plugin`:                https://github.com/pulse00/Twig-Eclipse-Plugin
900 900
 .. _`Twig language definition`:   https://github.com/gabrielcorpse/gedit-twig-template-language
901
-.. _`extension repository`:       http://github.com/twigphp/Twig-extensions
901
+.. _`extension repository`:       https://github.com/twigphp/Twig-extensions
902 902
 .. _`Twig syntax mode`:           https://github.com/bobthecow/Twig-HTML.mode
903 903
 .. _`other Twig syntax mode`:     https://github.com/muxx/Twig-HTML.mode
904 904
 .. _`Notepad++ Twig Highlighter`: https://github.com/Banane9/notepadplusplus-twig
905 905
 .. _`web-mode.el`:                http://web-mode.org/
906
-.. _`regular expressions`:        http://php.net/manual/en/pcre.pattern.php
906
+.. _`regular expressions`:        https://secure.php.net/manual/en/pcre.pattern.php
907 907
 .. _`PHP-twig for atom`:          https://github.com/reesef/php-twig
908
-.. _`TwigFiddle`:                 http://twigfiddle.com/
908
+.. _`TwigFiddle`:                 https://twigfiddle.com/
909 909
 .. _`Twig pack`:                  https://marketplace.visualstudio.com/items?itemName=bajdzis.vscode-twig-pack
... ...
@@ -15,8 +15,8 @@
15 15
  *
16 16
  * This parser implements a "Precedence climbing" algorithm.
17 17
  *
18
- * @see http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
19
- * @see http://en.wikipedia.org/wiki/Operator-precedence_parser
18
+ * @see https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
19
+ * @see https://en.wikipedia.org/wiki/Operator-precedence_parser
20 20
  *
21 21
  * @author Fabien Potencier <fabien@symfony.com>
22 22
  *
... ...
@@ -467,7 +467,7 @@ function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
467 467
  *
468 468
  * @param string            $str  String to replace in
469 469
  * @param array|Traversable $from Replace values
470
- * @param string|null       $to   Replace to, deprecated (@see http://php.net/manual/en/function.strtr.php)
470
+ * @param string|null       $to   Replace to, deprecated (@see https://secure.php.net/manual/en/function.strtr.php)
471 471
  *
472 472
  * @return string
473 473
  */
... ...
@@ -1000,7 +1000,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
1000 1000
 
1001 1001
     switch ($strategy) {
1002 1002
         case 'html':
1003
-            // see http://php.net/htmlspecialchars
1003
+            // see https://secure.php.net/htmlspecialchars
1004 1004
 
1005 1005
             // Using a static variable to avoid initializing the array
1006 1006
             // each time the function is called. Moving the declaration on the
... ...
@@ -1205,8 +1205,8 @@ function _twig_escape_css_callback($matches)
1205 1205
 /**
1206 1206
  * This function is adapted from code coming from Zend Framework.
1207 1207
  *
1208
- * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
1209
- * @license   http://framework.zend.com/license/new-bsd New BSD License
1208
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com)
1209
+ * @license   https://framework.zend.com/license/new-bsd New BSD License
1210 1210
  */
1211 1211
 function _twig_escape_html_attr_callback($matches)
1212 1212
 {
... ...
@@ -18,7 +18,7 @@
18 18
  * {% endsandbox %}
19 19
  * </pre>
20 20
  *
21
- * @see http://www.twig-project.org/doc/api.html#sandbox-extension for details
21
+ * @see https://twig.symfony.com/doc/api.html#sandbox-extension for details
22 22
  *
23 23
  * @final
24 24
  */
... ...
@@ -21,7 +21,7 @@
21 21
  * {% block content %}{% endblock %}
22 22
  * </pre>
23 23
  *
24
- * @see http://www.twig-project.org/doc/templates.html#horizontal-reuse for details.
24
+ * @see https://twig.symfony.com/doc/templates.html#horizontal-reuse for details.
25 25
  *
26 26
  * @final
27 27
  */
... ...
@@ -3,8 +3,8 @@
3 3
 /**
4 4
  * This class is adapted from code coming from Zend Framework.
5 5
  *
6
- * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
7
- * @license   http://framework.zend.com/license/new-bsd New BSD License
6
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com)
7
+ * @license   https://framework.zend.com/license/new-bsd New BSD License
8 8
  */
9 9
 class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase
10 10
 {