﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31605	messages shortcuts will not process with whitespace	Rory Patrick Sheridan	nobody	"When using:

{{{
messages.success(request, 'str')
}}}
or other shortcuts, messages that contain any whitespace do not show. A message that is a single string of characters with no whitespace such as ""**thisisanexample**"" will display, however ""**this is an example**"" or even "" "" will not be displayed on the page.

The cookie data is processed by the backend, as it can be seen in the cookies, but it is never read when parsing the page templates.
{% if messages %} returns False, so it isn't being read at all.

The exact same code but with no whitespace results in functionality.
I have tested it on Chrome and Chrome Android and it is the same on both devices.
I have tested it using tutorial code as well.
I have reproduced it using django 2.2.12, with the same browser versions, Stable Chrome builds.
I haven't tested other methods of displaying messages outside of shortcuts.

my relevant code:


{{{
def post_add(request):

    next = request.GET.get('next', '')
    if request.method == 'POST':
        form = PostForm(request.POST)

        if form.is_valid():
            form.save()
            messages.success(request, 'This is an example')
            return HttpResponseRedirect(next)

    else:
        form = PostForm()
    return HttpResponseRedirect(next)
}}}


Cookie data examples here: 
{{{
""44cb14ea2f1cade16b5dad1524386ff0ef096317$[[\""__json_message\""\0540\05440\054\""This is an example\""]]""
""2c19fe90a788435e86265a97348ae12eac4780d8$[[\""__json_message\""\0540\05425\054\""This is an example\""]]""
}}}
"	Bug	new	contrib.messages	3.0	Normal		messages, shortcuts, cookies, success, error, bug, message		Unreviewed	0	0	0	0	1	0
