mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 19:06:40 +00:00
use HTTPS whenever possible
This commit is contained in:
+2
-2
@@ -543,7 +543,7 @@ to host all the specific tags and filters you want to add to Twig.
|
||||
.. note::
|
||||
|
||||
Before writing your own extensions, have a look at the Twig official
|
||||
extension repository: http://github.com/twigphp/Twig-extensions.
|
||||
extension repository: https://github.com/twigphp/Twig-extensions.
|
||||
|
||||
An extension is a class that implements the following interface::
|
||||
|
||||
@@ -957,6 +957,6 @@ Testing the node visitors can be complex, so extend your test cases from
|
||||
``Twig_Test_NodeTestCase``. Examples can be found in the Twig repository
|
||||
`tests/Twig/Node`_ directory.
|
||||
|
||||
.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php
|
||||
.. _`rot13`: https://secure.php.net/manual/en/function.str-rot13.php
|
||||
.. _`tests/Twig/Fixtures`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Fixtures
|
||||
.. _`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.
|
||||
.. note::
|
||||
|
||||
Before writing your own extensions, have a look at the Twig official
|
||||
extension repository: http://github.com/twigphp/Twig-extensions.
|
||||
extension repository: https://github.com/twigphp/Twig-extensions.
|
||||
|
||||
An extension is a class that implements the following interface::
|
||||
|
||||
@@ -879,7 +879,7 @@ Testing the node visitors can be complex, so extend your test cases from
|
||||
``Twig_Test_NodeTestCase``. Examples can be found in the Twig repository
|
||||
`tests/Twig/Node`_ directory.
|
||||
|
||||
.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
|
||||
.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php
|
||||
.. _`spl_autoload_register()`: https://secure.php.net/spl_autoload_register
|
||||
.. _`rot13`: https://secure.php.net/manual/en/function.str-rot13.php
|
||||
.. _`tests/Twig/Fixtures`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Fixtures
|
||||
.. _`tests/Twig/Node`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Node
|
||||
|
||||
+1
-1
@@ -15,4 +15,4 @@ The ``abs`` filter returns the absolute value.
|
||||
|
||||
Internally, Twig uses the PHP `abs`_ function.
|
||||
|
||||
.. _`abs`: http://php.net/abs
|
||||
.. _`abs`: https://secure.php.net/abs
|
||||
|
||||
@@ -24,5 +24,5 @@ Arguments
|
||||
* ``to``: The output charset
|
||||
* ``from``: The input charset
|
||||
|
||||
.. _`iconv`: http://php.net/iconv
|
||||
.. _`mbstring`: http://php.net/mbstring
|
||||
.. _`iconv`: https://secure.php.net/iconv
|
||||
.. _`mbstring`: https://secure.php.net/mbstring
|
||||
|
||||
@@ -93,8 +93,8 @@ Arguments
|
||||
* ``format``: The date format
|
||||
* ``timezone``: The date timezone
|
||||
|
||||
.. _`strtotime`: http://www.php.net/strtotime
|
||||
.. _`DateTime`: http://www.php.net/DateTime
|
||||
.. _`DateInterval`: http://www.php.net/DateInterval
|
||||
.. _`date`: http://www.php.net/date
|
||||
.. _`DateInterval::format`: http://www.php.net/DateInterval.format
|
||||
.. _`strtotime`: https://secure.php.net/strtotime
|
||||
.. _`DateTime`: https://secure.php.net/DateTime
|
||||
.. _`DateInterval`: https://secure.php.net/DateInterval
|
||||
.. _`date`: https://secure.php.net/date
|
||||
.. _`DateInterval::format`: https://secure.php.net/DateInterval.format
|
||||
|
||||
@@ -19,5 +19,5 @@ Arguments
|
||||
|
||||
* ``modifier``: The modifier
|
||||
|
||||
.. _`strtotime`: http://www.php.net/strtotime
|
||||
.. _`DateTime`: http://www.php.net/DateTime
|
||||
.. _`strtotime`: https://secure.php.net/strtotime
|
||||
.. _`DateTime`: https://secure.php.net/DateTime
|
||||
|
||||
@@ -116,4 +116,4 @@ Arguments
|
||||
* ``strategy``: The escaping strategy
|
||||
* ``charset``: The string charset
|
||||
|
||||
.. _`htmlspecialchars`: http://php.net/htmlspecialchars
|
||||
.. _`htmlspecialchars`: https://secure.php.net/htmlspecialchars
|
||||
|
||||
@@ -22,4 +22,4 @@ a string:
|
||||
|
||||
It also works with objects implementing the `Traversable`_ interface.
|
||||
|
||||
.. _`Traversable`: http://php.net/manual/en/class.traversable.php
|
||||
.. _`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
|
||||
{# outputs I like foo and bar
|
||||
if the foo parameter equals to the foo string. #}
|
||||
|
||||
.. _`sprintf`: http://www.php.net/sprintf
|
||||
.. _`sprintf`: https://secure.php.net/sprintf
|
||||
|
||||
.. seealso:: :doc:`replace<replace>`
|
||||
|
||||
@@ -17,5 +17,5 @@ Arguments
|
||||
* ``options``: A bitmask of `json_encode options`_ (``{{
|
||||
data|json_encode(constant('JSON_PRETTY_PRINT')) }}``)
|
||||
|
||||
.. _`json_encode`: http://php.net/json_encode
|
||||
.. _`json_encode options`: http://www.php.net/manual/en/json.constants.php
|
||||
.. _`json_encode`: https://secure.php.net/json_encode
|
||||
.. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php
|
||||
|
||||
@@ -22,4 +22,4 @@ a string:
|
||||
|
||||
It also works with objects implementing the `Traversable`_ interface.
|
||||
|
||||
.. _`Traversable`: http://php.net/manual/en/class.traversable.php
|
||||
.. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
|
||||
|
||||
@@ -45,4 +45,4 @@ overridden.
|
||||
Internally, Twig uses the PHP `array_merge`_ function. It supports
|
||||
Traversable objects by transforming those to arrays.
|
||||
|
||||
.. _`array_merge`: http://php.net/array_merge
|
||||
.. _`array_merge`: https://secure.php.net/array_merge
|
||||
|
||||
@@ -53,4 +53,4 @@ Arguments
|
||||
* ``decimal_point``: The character(s) to use for the decimal point
|
||||
* ``thousand_sep``: The character(s) to use for the thousands separator
|
||||
|
||||
.. _`number_format`: http://php.net/number_format
|
||||
.. _`number_format`: https://secure.php.net/number_format
|
||||
|
||||
@@ -44,4 +44,4 @@ Arguments
|
||||
|
||||
* ``preserve_keys``: Preserve keys when reversing a mapping or a sequence.
|
||||
|
||||
.. _`Traversable`: http://php.net/Traversable
|
||||
.. _`Traversable`: https://secure.php.net/Traversable
|
||||
|
||||
@@ -65,7 +65,7 @@ Arguments
|
||||
* ``length``: The size of the slice
|
||||
* ``preserve_keys``: Whether to preserve key or not (when the input is an array)
|
||||
|
||||
.. _`Traversable`: http://php.net/manual/en/class.traversable.php
|
||||
.. _`array_slice`: http://php.net/array_slice
|
||||
.. _`mb_substr` : http://php.net/mb-substr
|
||||
.. _`substr`: http://php.net/substr
|
||||
.. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
|
||||
.. _`array_slice`: https://secure.php.net/array_slice
|
||||
.. _`mb_substr` : https://secure.php.net/mb-substr
|
||||
.. _`substr`: https://secure.php.net/substr
|
||||
|
||||
@@ -15,4 +15,4 @@ The ``sort`` filter sorts an array:
|
||||
association. It supports Traversable objects by transforming
|
||||
those to arrays.
|
||||
|
||||
.. _`asort`: http://php.net/asort
|
||||
.. _`asort`: https://secure.php.net/asort
|
||||
|
||||
@@ -49,5 +49,5 @@ Arguments
|
||||
* ``delimiter``: The delimiter
|
||||
* ``limit``: The limit argument
|
||||
|
||||
.. _`explode`: http://php.net/explode
|
||||
.. _`str_split`: http://php.net/str_split
|
||||
.. _`explode`: https://secure.php.net/explode
|
||||
.. _`str_split`: https://secure.php.net/str_split
|
||||
|
||||
@@ -26,4 +26,4 @@ Arguments
|
||||
|
||||
* ``allowable_tags``: Tags which should not be stripped
|
||||
|
||||
.. _`strip_tags`: http://php.net/strip_tags
|
||||
.. _`strip_tags`: https://secure.php.net/strip_tags
|
||||
|
||||
@@ -40,6 +40,6 @@ Arguments
|
||||
* ``side``: The default is to strip from the left and the right (`both`) sides, but `left`
|
||||
and `right` will strip from either the left side or right side only
|
||||
|
||||
.. _`trim`: http://php.net/trim
|
||||
.. _`ltrim`: http://php.net/ltrim
|
||||
.. _`rtrim`: http://php.net/rtrim
|
||||
.. _`trim`: https://secure.php.net/trim
|
||||
.. _`ltrim`: https://secure.php.net/ltrim
|
||||
.. _`rtrim`: https://secure.php.net/rtrim
|
||||
|
||||
@@ -29,6 +29,6 @@ or an array as query string:
|
||||
that as of Twig 1.16.0, ``urlencode`` **always** uses ``rawurlencode`` (the
|
||||
``raw`` argument was removed.)
|
||||
|
||||
.. _`urlencode`: http://php.net/urlencode
|
||||
.. _`rawurlencode`: http://php.net/rawurlencode
|
||||
.. _`http_build_query`: http://php.net/http_build_query
|
||||
.. _`urlencode`: https://secure.php.net/urlencode
|
||||
.. _`rawurlencode`: https://secure.php.net/rawurlencode
|
||||
.. _`http_build_query`: https://secure.php.net/http_build_query
|
||||
|
||||
@@ -52,4 +52,4 @@ Arguments
|
||||
* ``date``: The date
|
||||
* ``timezone``: The timezone
|
||||
|
||||
.. _`date and time formats`: http://php.net/manual/en/datetime.formats.php
|
||||
.. _`date and time formats`: https://secure.php.net/manual/en/datetime.formats.php
|
||||
|
||||
@@ -65,5 +65,5 @@ Arguments
|
||||
|
||||
* ``context``: The context to dump
|
||||
|
||||
.. _`XDebug`: http://xdebug.org/docs/display
|
||||
.. _`var_dump`: http://php.net/var_dump
|
||||
.. _`XDebug`: https://xdebug.org/docs/display
|
||||
.. _`var_dump`: https://secure.php.net/var_dump
|
||||
|
||||
@@ -26,4 +26,4 @@ Arguments
|
||||
|
||||
* ``values``: The values
|
||||
|
||||
.. _`mt_rand`: http://php.net/mt_rand
|
||||
.. _`mt_rand`: https://secure.php.net/mt_rand
|
||||
|
||||
@@ -55,4 +55,4 @@ Arguments
|
||||
* ``high``: The highest possible value of the sequence.
|
||||
* ``step``: The increment between elements of the sequence.
|
||||
|
||||
.. _`range`: http://php.net/range
|
||||
.. _`range`: https://secure.php.net/range
|
||||
|
||||
@@ -113,4 +113,4 @@ PHP code but only provides an optimized version of the
|
||||
.. _`download page`: https://github.com/twigphp/Twig/tags
|
||||
.. _`Composer`: https://getcomposer.org/download/
|
||||
.. _`PHP documentation`: https://wiki.php.net/internals/windows/stepbystepbuild
|
||||
.. _`Zend Server FAQ`: http://www.zend.com/en/products/server/faq#faqD6
|
||||
.. _`Zend Server FAQ`: https://www.zend.com/en/products/server/faq#faqD6
|
||||
|
||||
+2
-2
@@ -150,7 +150,7 @@ parent's full, unambiguous template path in the extends tag:
|
||||
.. note::
|
||||
|
||||
This recipe was inspired by the following Django wiki page:
|
||||
http://code.djangoproject.com/wiki/ExtendingTemplates
|
||||
https://code.djangoproject.com/wiki/ExtendingTemplates
|
||||
|
||||
Customizing the Syntax
|
||||
----------------------
|
||||
@@ -565,4 +565,4 @@ include in your templates:
|
||||
'tag_variable' => array('{[', ']}'),
|
||||
)));
|
||||
|
||||
.. _callback: http://www.php.net/manual/en/function.is-callable.php
|
||||
.. _callback: https://secure.php.net/manual/en/function.is-callable.php
|
||||
|
||||
+1
-1
@@ -14,4 +14,4 @@ The ``flush`` tag tells Twig to flush the output buffer:
|
||||
|
||||
Internally, Twig uses the PHP `flush`_ function.
|
||||
|
||||
.. _`flush`: http://php.net/flush
|
||||
.. _`flush`: https://secure.php.net/flush
|
||||
|
||||
+3
-3
@@ -898,12 +898,12 @@ Extension<creating_extensions>` chapter.
|
||||
.. _`Twig syntax plugin`: http://plugins.netbeans.org/plugin/37069/php-twig
|
||||
.. _`Twig plugin`: https://github.com/pulse00/Twig-Eclipse-Plugin
|
||||
.. _`Twig language definition`: https://github.com/gabrielcorpse/gedit-twig-template-language
|
||||
.. _`extension repository`: http://github.com/twigphp/Twig-extensions
|
||||
.. _`extension repository`: https://github.com/twigphp/Twig-extensions
|
||||
.. _`Twig syntax mode`: https://github.com/bobthecow/Twig-HTML.mode
|
||||
.. _`other Twig syntax mode`: https://github.com/muxx/Twig-HTML.mode
|
||||
.. _`Notepad++ Twig Highlighter`: https://github.com/Banane9/notepadplusplus-twig
|
||||
.. _`web-mode.el`: http://web-mode.org/
|
||||
.. _`regular expressions`: http://php.net/manual/en/pcre.pattern.php
|
||||
.. _`regular expressions`: https://secure.php.net/manual/en/pcre.pattern.php
|
||||
.. _`PHP-twig for atom`: https://github.com/reesef/php-twig
|
||||
.. _`TwigFiddle`: http://twigfiddle.com/
|
||||
.. _`TwigFiddle`: https://twigfiddle.com/
|
||||
.. _`Twig pack`: https://marketplace.visualstudio.com/items?itemName=bajdzis.vscode-twig-pack
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
*
|
||||
* This parser implements a "Precedence climbing" algorithm.
|
||||
*
|
||||
* @see http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
|
||||
* @see http://en.wikipedia.org/wiki/Operator-precedence_parser
|
||||
* @see https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
|
||||
* @see https://en.wikipedia.org/wiki/Operator-precedence_parser
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
|
||||
@@ -467,7 +467,7 @@ function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
|
||||
*
|
||||
* @param string $str String to replace in
|
||||
* @param array|Traversable $from Replace values
|
||||
* @param string|null $to Replace to, deprecated (@see http://php.net/manual/en/function.strtr.php)
|
||||
* @param string|null $to Replace to, deprecated (@see https://secure.php.net/manual/en/function.strtr.php)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -1000,7 +1000,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
|
||||
|
||||
switch ($strategy) {
|
||||
case 'html':
|
||||
// see http://php.net/htmlspecialchars
|
||||
// see https://secure.php.net/htmlspecialchars
|
||||
|
||||
// Using a static variable to avoid initializing the array
|
||||
// each time the function is called. Moving the declaration on the
|
||||
@@ -1205,8 +1205,8 @@ function _twig_escape_css_callback($matches)
|
||||
/**
|
||||
* This function is adapted from code coming from Zend Framework.
|
||||
*
|
||||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
function _twig_escape_html_attr_callback($matches)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* {% endsandbox %}
|
||||
* </pre>
|
||||
*
|
||||
* @see http://www.twig-project.org/doc/api.html#sandbox-extension for details
|
||||
* @see https://twig.symfony.com/doc/api.html#sandbox-extension for details
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* {% block content %}{% endblock %}
|
||||
* </pre>
|
||||
*
|
||||
* @see http://www.twig-project.org/doc/templates.html#horizontal-reuse for details.
|
||||
* @see https://twig.symfony.com/doc/templates.html#horizontal-reuse for details.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* This class is adapted from code coming from Zend Framework.
|
||||
*
|
||||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user