django/django — pull request #751 by bmispelon (2013-02-23 12:23:52+00:00)
Title: Use `token.split_contents()` in tags that can take variables (fixes #6271 and #18260)

After fixing #19882, I grepped through the code to check for usage of `token.contents.split()`.

It turned out that several other tags were affected by the same issue, so I fix those.

There are still tags that use `token.contents.split()` instead of `token.split_contents()`, but since they don't take any variable argument, they are not affected.

Here's a list of the remaining instances of `token.contents.split()` and the tags they are associated with:

django/template/base.py:262:
django/template/defaulttags.py:492: autoescape
django/template/defaulttags.py:636: filter
django/template/defaulttags.py:1014: load
django/template/defaulttags.py:1186: templatetag
django/template/loader_tags.py:178: block
django/templatetags/i18n.py:188: get_available_languages
django/templatetags/i18n.py:260: get_current_language
django/templatetags/i18n.py:278: get_current_language_bidi
django/templatetags/static.py:30: get_static_prefix, get_media_prefix
django/templatetags/tz.py:193: get_current_timezone

Also note that there are still tags that are affected by this issue in `contrib`.
Namely, all the tags from `contrib.comments` as well as the `get_admin_log` for `contrib.admin`.
Those did not have any tests and I didn't see any bugs in the tracker, so I left them as-is (for now).