[1.8.x] Updated Wikipedia links to use https
Backport of 64982cc2fb
from master.
This commit is contained in:
parent
293c5fcdcc
commit
cda66497aa
|
@ -34,7 +34,7 @@ INTERNAL_IPS = ()
|
|||
ALLOWED_HOSTS = []
|
||||
|
||||
# Local time zone for this installation. All choices can be found here:
|
||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name (although not all
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_zones_by_name (although not all
|
||||
# systems may support all possibilities). When USE_TZ is True, this is
|
||||
# interpreted as the default user time zone.
|
||||
TIME_ZONE = 'America/Chicago'
|
||||
|
|
|
@ -24,7 +24,7 @@ class XFrameOptionsMiddleware(object):
|
|||
clickjacking protection techniques should be used if protection in those
|
||||
browsers is required.
|
||||
|
||||
http://en.wikipedia.org/wiki/Clickjacking#Server_and_client
|
||||
https://en.wikipedia.org/wiki/Clickjacking#Server_and_client
|
||||
"""
|
||||
def process_response(self, request, response):
|
||||
# Don't set it if it's already in the response
|
||||
|
|
|
@ -58,7 +58,7 @@ except ImportError:
|
|||
f.cache_info(). Clear the cache and statistics with f.cache_clear().
|
||||
Access the underlying function with f.__wrapped__.
|
||||
|
||||
See: http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used
|
||||
See: https://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ Django is pronounced **JANG**-oh. Rhymes with FANG-oh. The "D" is silent.
|
|||
|
||||
We've also recorded an `audio clip of the pronunciation`_.
|
||||
|
||||
.. _Django Reinhardt: http://en.wikipedia.org/wiki/Django_Reinhardt
|
||||
.. _Django Reinhardt: https://en.wikipedia.org/wiki/Django_Reinhardt
|
||||
.. _audio clip of the pronunciation: http://red-bean.com/~adrian/django_pronunciation.mp3
|
||||
|
||||
Is Django stable?
|
||||
|
|
|
@ -37,7 +37,7 @@ Glossary
|
|||
`Model-view-controller`__; a software pattern. Django :ref:`follows MVC
|
||||
to some extent <faq-mtv>`.
|
||||
|
||||
__ http://en.wikipedia.org/wiki/Model-view-controller
|
||||
__ https://en.wikipedia.org/wiki/Model-view-controller
|
||||
|
||||
project
|
||||
A Python package -- i.e. a directory of code -- that contains all the
|
||||
|
|
|
@ -48,7 +48,7 @@ something like this::
|
|||
|
||||
# ... (other possibly useful methods omitted) ...
|
||||
|
||||
.. _Bridge: http://en.wikipedia.org/wiki/Contract_bridge
|
||||
.. _Bridge: https://en.wikipedia.org/wiki/Contract_bridge
|
||||
|
||||
This is just an ordinary Python class, with nothing Django-specific about it.
|
||||
We'd like to be able to do things like this in our models (we assume the
|
||||
|
|
|
@ -140,8 +140,8 @@ control which information should be filtered out of error reports in a
|
|||
production environment (that is, where :setting:`DEBUG` is set to ``False``):
|
||||
:func:`sensitive_variables` and :func:`sensitive_post_parameters`.
|
||||
|
||||
.. _`full traceback`: http://en.wikipedia.org/wiki/Stack_trace
|
||||
.. _`traceback frame`: http://en.wikipedia.org/wiki/Stack_frame
|
||||
.. _`full traceback`: https://en.wikipedia.org/wiki/Stack_trace
|
||||
.. _`traceback frame`: https://en.wikipedia.org/wiki/Stack_frame
|
||||
|
||||
.. function:: sensitive_variables(*variables)
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ team <core-team>`.
|
|||
as a freelance developer.
|
||||
|
||||
.. _luke plant: http://lukeplant.me.uk/
|
||||
.. _michael meeks: http://en.wikipedia.org/wiki/Michael_Meeks_(software)
|
||||
.. _michael meeks: https://en.wikipedia.org/wiki/Michael_Meeks_(software)
|
||||
|
||||
`Russell Keith-Magee`_
|
||||
Russell studied physics as an undergraduate, and studied neural networks for
|
||||
|
@ -603,7 +603,7 @@ Joseph Kocherhans
|
|||
|
||||
Joseph lives in Chicago, USA.
|
||||
|
||||
.. _charango: http://en.wikipedia.org/wiki/Charango
|
||||
.. _charango: https://en.wikipedia.org/wiki/Charango
|
||||
|
||||
`Gary Wilson`_
|
||||
Gary starting contributing patches to Django in 2006 while developing Web
|
||||
|
|
|
@ -220,7 +220,7 @@ is not very helpful at preventing that bug from reoccurring down the road.
|
|||
|
||||
Now for our hands-on example.
|
||||
|
||||
__ http://en.wikipedia.org/wiki/Test-driven_development
|
||||
__ https://en.wikipedia.org/wiki/Test-driven_development
|
||||
|
||||
Writing some tests for ticket #17549
|
||||
------------------------------------
|
||||
|
|
|
@ -19,7 +19,7 @@ Although you can use Django without a database, it comes with an
|
|||
`object-relational mapper`_ in which you describe your database layout in Python
|
||||
code.
|
||||
|
||||
.. _object-relational mapper: http://en.wikipedia.org/wiki/Object-relational_mapping
|
||||
.. _object-relational mapper: https://en.wikipedia.org/wiki/Object-relational_mapping
|
||||
|
||||
The :doc:`data-model syntax </topics/db/models>` offers many rich ways of
|
||||
representing your models -- so far, it's been solving many years' worth of
|
||||
|
|
|
@ -157,7 +157,7 @@ Finally, a performance note: these regular expressions are compiled the first
|
|||
time the URLconf module is loaded. They're super fast (as long as the lookups
|
||||
aren't too complex as noted above).
|
||||
|
||||
.. _Wikipedia's entry: http://en.wikipedia.org/wiki/Regular_expression
|
||||
.. _Wikipedia's entry: https://en.wikipedia.org/wiki/Regular_expression
|
||||
|
||||
:func:`~django.conf.urls.url` argument: view
|
||||
--------------------------------------------
|
||||
|
|
|
@ -121,7 +121,7 @@ the next time you make a change, either when you add a new feature or fix a bug.
|
|||
|
||||
So let's do that right away.
|
||||
|
||||
.. _test-driven development: http://en.wikipedia.org/wiki/Test-driven_development
|
||||
.. _test-driven development: https://en.wikipedia.org/wiki/Test-driven_development
|
||||
|
||||
Writing our first test
|
||||
======================
|
||||
|
@ -681,7 +681,7 @@ Coverage will help to identify dead code. See
|
|||
information about testing.
|
||||
|
||||
.. _Selenium: http://seleniumhq.org/
|
||||
.. _continuous integration: http://en.wikipedia.org/wiki/Continuous_integration
|
||||
.. _continuous integration: https://en.wikipedia.org/wiki/Continuous_integration
|
||||
|
||||
What's next?
|
||||
============
|
||||
|
|
|
@ -10,7 +10,7 @@ against `clickjacking`_. This type of attack occurs when a malicious site
|
|||
tricks a user into clicking on a concealed element of another site which they
|
||||
have loaded in a hidden frame or iframe.
|
||||
|
||||
.. _clickjacking: http://en.wikipedia.org/wiki/Clickjacking
|
||||
.. _clickjacking: https://en.wikipedia.org/wiki/Clickjacking
|
||||
|
||||
An example of clickjacking
|
||||
==========================
|
||||
|
@ -128,4 +128,4 @@ See also
|
|||
A `complete list`_ of browsers supporting ``X-Frame-Options``.
|
||||
|
||||
.. _complete list: https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header#Browser_compatibility
|
||||
.. _other clickjacking prevention techniques: http://en.wikipedia.org/wiki/Clickjacking#Prevention
|
||||
.. _other clickjacking prevention techniques: https://en.wikipedia.org/wiki/Clickjacking#Prevention
|
||||
|
|
|
@ -731,7 +731,7 @@ the distance from the `Tasmanian`__ city of Hobart to every other
|
|||
:ref:`supported_units`.
|
||||
|
||||
__ https://github.com/django/django/blob/master/tests/gis_tests/distapp/models.py
|
||||
__ http://en.wikipedia.org/wiki/Tasmania
|
||||
__ https://en.wikipedia.org/wiki/Tasmania
|
||||
|
||||
``length``
|
||||
~~~~~~~~~~
|
||||
|
@ -994,7 +994,7 @@ Keyword Argument Description
|
|||
of 2 or 3. The default value is 2.
|
||||
===================== =====================================================
|
||||
|
||||
__ http://en.wikipedia.org/wiki/Geography_Markup_Language
|
||||
__ https://en.wikipedia.org/wiki/Geography_Markup_Language
|
||||
|
||||
``kml``
|
||||
~~~~~~~
|
||||
|
|
|
@ -16,7 +16,7 @@ example::
|
|||
poly = models.PolygonField()
|
||||
objects = models.GeoManager()
|
||||
|
||||
__ http://en.wikipedia.org/wiki/ZIP_code
|
||||
__ https://en.wikipedia.org/wiki/ZIP_code
|
||||
|
||||
Geometry Field Types
|
||||
====================
|
||||
|
@ -82,7 +82,7 @@ Sets the SRID [#fnogcsrid]_ (Spatial Reference System Identity) of the geometry
|
|||
the given value. Defaults to 4326 (also known as `WGS84`__, units are in degrees
|
||||
of longitude and latitude).
|
||||
|
||||
__ http://en.wikipedia.org/wiki/WGS84
|
||||
__ https://en.wikipedia.org/wiki/WGS84
|
||||
|
||||
.. _selecting-an-srid:
|
||||
|
||||
|
@ -135,8 +135,8 @@ Additional Resources:
|
|||
data encountered will be in one of these coordinate systems rather than
|
||||
in a geographic coordinate system such as WGS84.
|
||||
|
||||
__ http://en.wikipedia.org/wiki/Geodesy
|
||||
__ http://en.wikipedia.org/wiki/Great_circle
|
||||
__ https://en.wikipedia.org/wiki/Geodesy
|
||||
__ https://en.wikipedia.org/wiki/Great_circle
|
||||
__ http://www.spatialreference.org/ref/epsg/2796/
|
||||
__ http://spatialreference.org/
|
||||
__ http://web.archive.org/web/20080302095452/http://welcome.warnercnr.colostate.edu/class_info/nr502/lg3/datums_coordinates/spcs.html
|
||||
|
|
|
@ -158,7 +158,7 @@ extensions:
|
|||
data stored in the shapefile.
|
||||
|
||||
__ http://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip
|
||||
__ http://en.wikipedia.org/wiki/Shapefile
|
||||
__ https://en.wikipedia.org/wiki/Shapefile
|
||||
|
||||
Use ``ogrinfo`` to examine spatial data
|
||||
---------------------------------------
|
||||
|
@ -259,7 +259,7 @@ longitude, latitude pairs in units of degrees. To use a different
|
|||
coordinate system, set the SRID of the geometry field with the ``srid``
|
||||
argument. Use an integer representing the coordinate system's EPSG code.
|
||||
|
||||
__ http://en.wikipedia.org/wiki/SRID
|
||||
__ https://en.wikipedia.org/wiki/SRID
|
||||
|
||||
Run ``migrate``
|
||||
---------------
|
||||
|
|
|
@ -239,7 +239,7 @@ be vulnerable via an insecure connection to a subdomain.
|
|||
it may be because Django doesn't realize that it's on a secure connection;
|
||||
you may need to set the :setting:`SECURE_PROXY_SSL_HEADER` setting.
|
||||
|
||||
.. _"Strict-Transport-Security" header: http://en.wikipedia.org/wiki/Strict_Transport_Security
|
||||
.. _"Strict-Transport-Security" header: https://en.wikipedia.org/wiki/Strict_Transport_Security
|
||||
|
||||
.. _x-content-type-options:
|
||||
|
||||
|
@ -298,7 +298,7 @@ header. ``SecurityMiddleware`` will do this for all responses if the
|
|||
browsers support the header. Ensure you are still :ref:`validating and
|
||||
sanitizing <cross-site-scripting>` all input to prevent XSS attacks.
|
||||
|
||||
.. _XSS attack: http://en.wikipedia.org/wiki/Cross-site_scripting
|
||||
.. _XSS attack: https://en.wikipedia.org/wiki/Cross-site_scripting
|
||||
.. _X-XSS-Protection header: http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx
|
||||
|
||||
.. _ssl-redirect:
|
||||
|
|
|
@ -101,7 +101,7 @@ middleware; if so this middleware must be listed first in
|
|||
In Django 1.7, the trailing dot is stripped when performing host validation,
|
||||
thus an entry with a trailing dot isn't required.
|
||||
|
||||
.. _`fully qualified domain name (FQDN)`: http://en.wikipedia.org/wiki/Fully_qualified_domain_name
|
||||
.. _`fully qualified domain name (FQDN)`: https://en.wikipedia.org/wiki/Fully_qualified_domain_name
|
||||
|
||||
If the ``Host`` header (or ``X-Forwarded-Host`` if
|
||||
:setting:`USE_X_FORWARDED_HOST` is enabled) does not match any value in this
|
||||
|
@ -2650,7 +2650,7 @@ to ensure your processes are running in the correct environment.
|
|||
If you're running Django on Windows, :setting:`TIME_ZONE` must be set to
|
||||
match the system time zone.
|
||||
|
||||
.. _list of time zones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
.. _list of time zones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
|
||||
.. _pytz: http://pytz.sourceforge.net/
|
||||
|
||||
|
|
|
@ -487,7 +487,7 @@ escaped:
|
|||
Again, we stress that this behavior is on by default. If you're using Django's
|
||||
template system, you're protected.
|
||||
|
||||
.. _Cross Site Scripting: http://en.wikipedia.org/wiki/Cross-site_scripting
|
||||
.. _Cross Site Scripting: https://en.wikipedia.org/wiki/Cross-site_scripting
|
||||
|
||||
How to turn it off
|
||||
------------------
|
||||
|
|
|
@ -134,7 +134,7 @@ creating and completing this feature.
|
|||
|
||||
See http://geodjango.org/ for details.
|
||||
|
||||
.. _Geographic Information Systems: http://en.wikipedia.org/wiki/Geographic_information_system
|
||||
.. _Geographic Information Systems: https://en.wikipedia.org/wiki/Geographic_information_system
|
||||
|
||||
Pluggable file storage
|
||||
----------------------
|
||||
|
|
|
@ -459,7 +459,7 @@ prohibited). However, if avoiding profanities is important to you, you
|
|||
would be well advised to seek out a better, less naive approach to the
|
||||
problem.
|
||||
|
||||
.. _Scunthorpe problem: http://en.wikipedia.org/wiki/Scunthorpe_problem
|
||||
.. _Scunthorpe problem: https://en.wikipedia.org/wiki/Scunthorpe_problem
|
||||
.. _commit that implemented this change: https://code.djangoproject.com/changeset/13996
|
||||
|
||||
Localflavor changes
|
||||
|
|
|
@ -273,10 +273,10 @@ uses the PBKDF2_ algorithm (as recommended by NIST_). You can also easily choose
|
|||
a different algorithm (including the popular bcrypt_ algorithm). For more
|
||||
details, see :ref:`auth_password_storage`.
|
||||
|
||||
.. _sha1: http://en.wikipedia.org/wiki/SHA1
|
||||
.. _pbkdf2: http://en.wikipedia.org/wiki/PBKDF2
|
||||
.. _sha1: https://en.wikipedia.org/wiki/SHA1
|
||||
.. _pbkdf2: https://en.wikipedia.org/wiki/PBKDF2
|
||||
.. _nist: http://csrc.nist.gov/publications/nistpubs/800-132/nist-sp800-132.pdf
|
||||
.. _bcrypt: http://en.wikipedia.org/wiki/Bcrypt
|
||||
.. _bcrypt: https://en.wikipedia.org/wiki/Bcrypt
|
||||
|
||||
HTML5 doctype
|
||||
~~~~~~~~~~~~~
|
||||
|
@ -483,7 +483,7 @@ Simple clickjacking protection
|
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
We've added a middleware to provide easy protection against `clickjacking
|
||||
<http://en.wikipedia.org/wiki/Clickjacking>`_ using the ``X-Frame-Options``
|
||||
<https://en.wikipedia.org/wiki/Clickjacking>`_ using the ``X-Frame-Options``
|
||||
header. It's not enabled by default for backwards compatibility reasons, but
|
||||
you'll almost certainly want to :doc:`enable it </ref/clickjacking/>` to help
|
||||
plug that security hole for browsers that support the header.
|
||||
|
|
|
@ -1169,7 +1169,7 @@ This can lead to security problems where fields are added to the model and,
|
|||
unintentionally, automatically become editable by end users. In some cases,
|
||||
particular with boolean fields, it is possible for this problem to be completely
|
||||
invisible. This is a form of `Mass assignment vulnerability
|
||||
<http://en.wikipedia.org/wiki/Mass_assignment_vulnerability>`_.
|
||||
<https://en.wikipedia.org/wiki/Mass_assignment_vulnerability>`_.
|
||||
|
||||
For this reason, this behavior is deprecated, and using the ``Meta.exclude``
|
||||
option is strongly discouraged. Instead, all fields that are intended for
|
||||
|
|
|
@ -11,7 +11,7 @@ reporting and disclosure of security-related issues, as outlined in
|
|||
As part of that commitment, we maintain the following historical list
|
||||
of issues which have been fixed and disclosed. For each issue, the
|
||||
list below includes the date, a brief description, the `CVE identifier
|
||||
<http://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures>`_
|
||||
<https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures>`_
|
||||
if applicable, a list of affected versions, a link to the full
|
||||
disclosure and links to the appropriate patch(es).
|
||||
|
||||
|
|
|
@ -194,10 +194,10 @@ sure never to *remove* entries from this list. If you do, users using
|
|||
unmentioned algorithms won't be able to upgrade. Passwords will be upgraded
|
||||
when changing the PBKDF2 iteration count.
|
||||
|
||||
.. _sha1: http://en.wikipedia.org/wiki/SHA1
|
||||
.. _pbkdf2: http://en.wikipedia.org/wiki/PBKDF2
|
||||
.. _sha1: https://en.wikipedia.org/wiki/SHA1
|
||||
.. _pbkdf2: https://en.wikipedia.org/wiki/PBKDF2
|
||||
.. _nist: http://csrc.nist.gov/publications/nistpubs/800-132/nist-sp800-132.pdf
|
||||
.. _bcrypt: http://en.wikipedia.org/wiki/Bcrypt
|
||||
.. _bcrypt: https://en.wikipedia.org/wiki/Bcrypt
|
||||
.. _`bcrypt library`: https://pypi.python.org/pypi/bcrypt/
|
||||
|
||||
|
||||
|
|
|
@ -421,7 +421,7 @@ that we're heavily invested in `REST`_, so we want to use the same URL for
|
|||
displaying the author as for capturing the message from the
|
||||
user. Let's rewrite our ``AuthorDetailView`` to do that.
|
||||
|
||||
.. _REST: http://en.wikipedia.org/wiki/Representational_state_transfer
|
||||
.. _REST: https://en.wikipedia.org/wiki/Representational_state_transfer
|
||||
|
||||
We'll keep the ``GET`` handling from :class:`DetailView`, although
|
||||
we'll have to add a :class:`~django.forms.Form` into the context data so we can
|
||||
|
|
|
@ -48,7 +48,7 @@ Use standard DB optimization techniques
|
|||
database-dependent topic that will depend on your particular application.
|
||||
The overhead of maintaining an index may outweigh any gains in query speed.
|
||||
|
||||
.. _Indexes: http://en.wikipedia.org/wiki/Database_index
|
||||
.. _Indexes: https://en.wikipedia.org/wiki/Database_index
|
||||
|
||||
* Appropriate use of field types.
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ argument.
|
|||
fall victim to SQL injection. As long as you remember to always use the
|
||||
``params`` argument you'll be protected.
|
||||
|
||||
__ http://en.wikipedia.org/wiki/SQL_injection
|
||||
__ https://en.wikipedia.org/wiki/SQL_injection
|
||||
|
||||
.. _executing-custom-sql:
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Tablespaces
|
|||
A common paradigm for optimizing performance in database systems is the use of
|
||||
`tablespaces`_ to organize disk layout.
|
||||
|
||||
.. _`tablespaces`: http://en.wikipedia.org/wiki/Tablespace
|
||||
.. _`tablespaces`: https://en.wikipedia.org/wiki/Tablespace
|
||||
|
||||
.. warning::
|
||||
Django does not create the tablespaces for you. Please refer to your
|
||||
|
|
|
@ -171,7 +171,7 @@ and the :setting:`SECRET_KEY` setting.
|
|||
Finally, the size of a cookie can have an impact on the `speed of your site`_.
|
||||
|
||||
.. _`common limit of 4096 bytes`: http://tools.ietf.org/html/rfc2965#section-5.3
|
||||
.. _`replay attacks`: http://en.wikipedia.org/wiki/Replay_attack
|
||||
.. _`replay attacks`: https://en.wikipedia.org/wiki/Replay_attack
|
||||
.. _`speed of your site`: http://yuiblog.com/blog/2007/03/01/performance-research-part-3/
|
||||
|
||||
Using sessions in views
|
||||
|
|
|
@ -50,7 +50,7 @@ More details can be found in the `W3C Web Internationalization FAQ`_, the `Wikip
|
|||
|
||||
.. _W3C Web Internationalization FAQ: http://www.w3.org/International/questions/qa-i18n
|
||||
.. _GNU gettext documentation: http://www.gnu.org/software/gettext/manual/gettext.html#Concepts
|
||||
.. _Wikipedia article: http://en.wikipedia.org/wiki/Internationalization_and_localization
|
||||
.. _Wikipedia article: https://en.wikipedia.org/wiki/Internationalization_and_localization
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
@ -704,4 +704,4 @@ Usage
|
|||
.. _more examples: http://pytz.sourceforge.net/#example-usage
|
||||
.. _these issues: http://pytz.sourceforge.net/#problems-with-localtime
|
||||
.. _helpers: http://pytz.sourceforge.net/#helpers
|
||||
.. _tz database: http://en.wikipedia.org/wiki/Tz_database
|
||||
.. _tz database: https://en.wikipedia.org/wiki/Tz_database
|
||||
|
|
|
@ -249,7 +249,7 @@ User-uploaded content
|
|||
file extensions for user uploaded files and configure the web server
|
||||
to only serve such files.
|
||||
|
||||
.. _same-origin policy: http://en.wikipedia.org/wiki/Same-origin_policy
|
||||
.. _same-origin policy: https://en.wikipedia.org/wiki/Same-origin_policy
|
||||
|
||||
.. _additional-security-topics:
|
||||
|
||||
|
|
|
@ -798,7 +798,7 @@ least as many as the number of potential parallel processes). For example:
|
|||
Then, during test execution, each new live test server will try every specified
|
||||
port until it finds one that is free and takes it.
|
||||
|
||||
.. _continuous integration: http://en.wikipedia.org/wiki/Continuous_integration
|
||||
.. _continuous integration: https://en.wikipedia.org/wiki/Continuous_integration
|
||||
|
||||
To demonstrate how to use ``LiveServerTestCase``, let's write a simple Selenium
|
||||
test. First of all, you need to install the `selenium package`_ into your
|
||||
|
|
|
@ -139,16 +139,16 @@ class FunctionTests(SimpleTestCase):
|
|||
'www.mystore.com/30%OffCoupons</a>!',
|
||||
)
|
||||
self.assertEqual(
|
||||
urlize('http://en.wikipedia.org/wiki/Caf%C3%A9'),
|
||||
'<a href="http://en.wikipedia.org/wiki/Caf%C3%A9" rel="nofollow">'
|
||||
'http://en.wikipedia.org/wiki/Caf%C3%A9</a>',
|
||||
urlize('https://en.wikipedia.org/wiki/Caf%C3%A9'),
|
||||
'<a href="https://en.wikipedia.org/wiki/Caf%C3%A9" rel="nofollow">'
|
||||
'https://en.wikipedia.org/wiki/Caf%C3%A9</a>',
|
||||
)
|
||||
|
||||
def test_unicode(self):
|
||||
self.assertEqual(
|
||||
urlize('http://en.wikipedia.org/wiki/Café'),
|
||||
'<a href="http://en.wikipedia.org/wiki/Caf%C3%A9" rel="nofollow">'
|
||||
'http://en.wikipedia.org/wiki/Café</a>',
|
||||
urlize('https://en.wikipedia.org/wiki/Café'),
|
||||
'<a href="https://en.wikipedia.org/wiki/Caf%C3%A9" rel="nofollow">'
|
||||
'https://en.wikipedia.org/wiki/Café</a>',
|
||||
)
|
||||
|
||||
def test_parenthesis(self):
|
||||
|
@ -156,14 +156,14 @@ class FunctionTests(SimpleTestCase):
|
|||
#11911 - Check urlize keeps balanced parentheses
|
||||
"""
|
||||
self.assertEqual(
|
||||
urlize('http://en.wikipedia.org/wiki/Django_(web_framework)'),
|
||||
'<a href="http://en.wikipedia.org/wiki/Django_(web_framework)" rel="nofollow">'
|
||||
'http://en.wikipedia.org/wiki/Django_(web_framework)</a>',
|
||||
urlize('https://en.wikipedia.org/wiki/Django_(web_framework)'),
|
||||
'<a href="https://en.wikipedia.org/wiki/Django_(web_framework)" rel="nofollow">'
|
||||
'https://en.wikipedia.org/wiki/Django_(web_framework)</a>',
|
||||
)
|
||||
self.assertEqual(
|
||||
urlize('(see http://en.wikipedia.org/wiki/Django_(web_framework))'),
|
||||
'(see <a href="http://en.wikipedia.org/wiki/Django_(web_framework)" rel="nofollow">'
|
||||
'http://en.wikipedia.org/wiki/Django_(web_framework)</a>)',
|
||||
urlize('(see https://en.wikipedia.org/wiki/Django_(web_framework))'),
|
||||
'(see <a href="https://en.wikipedia.org/wiki/Django_(web_framework)" rel="nofollow">'
|
||||
'https://en.wikipedia.org/wiki/Django_(web_framework)</a>)',
|
||||
)
|
||||
|
||||
def test_nofollow(self):
|
||||
|
|
Loading…
Reference in New Issue