Correct form of escaping and localization – functions.php breadcrumbs

The general rule is that you should escape as close to the place of actual output as possible. The reason for that is that if your escape is far removed from output then you assume output to be escaped… Until at some point in the future something changes in the other corner of the file and that’s no longer the case.

On what should be escaped is mostly matter of how likely it is to contain unsafe and/or user–produced input. Template tags are rarely explicitly escaped. In some cases escaping them would actively break stuff if they are intended to have HTML in the output under some circumstances. Like infamous admins being able to put HTML into titles.

Notably you can’t HTML escape a whole block of HTML like a breadcrumb. Defeats the point.

You seem to be ok on localization bit.