Description

In module template.loader.tags the do_extends function parses a tokens
content like this: bits = token.contents.split() which does not
work correctly if the extends path has a folder name with a space in it
(as one of mine did). I understand token.split_contents() should
be used.

The patch above makes use of token.split_contents() for both the include and extends tags, with tests that failed before the patch and now pass.

I left token.contents.split() there for the block tag since allowing spaces in that tag ({% block 'my block' %}) requires some design thought and might have side-effects that need to be thought about and tested. If we want to allow spaces in the block tag, that patch is trivial.

I may see if we can safely remove other instances of token.contents.split() from django as well.

The remaining calls to token.contents.split() appear to be valid and moving to token.split_contents might introduce unwanted changes. The above tags took arguments in strings whereas the remaining tags don't. It might be revisiting these at a later date for consistency.