﻿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
24045	Useless calls to mark_safe and mark_for_escaping	Aymeric Augustin	nobody	"Currently Django contains code similar to:

{{{
    if isinstance(message, SafeData):
        return mark_safe(message)
}}}

Since `mark_safe` is a no-op on `SafeData` instances, that's  useless!

We should check when that code was introduced, if `mark_safe` was always a no-op on `SafeData`, and if that reveals a bug or simply useless code.

In the former case we should fix the bug, in the latter remove the code.

There are similar cases with `mark_for_escaping` which is a no-op both on `SafeData` and `EscapeData` instances."	Cleanup/optimization	closed	Core (Other)	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
