loader: do not output empty menu title
As we output spaces around the menu title, we should also check,
if the title is actually empty string.
PR: 255299
Submitted by: Jose Luis Duran
Reported by: Jose Luis Duran
(cherry picked from commit 4ba91fa0736bb0672d475b6b56d9e7b06e78ff69)