backport menu URI encoding, commit f17fda1d4a6f94855b6212cd81c53361d9b39281