Added custom encodeLabel attributes of the CMenu items

fixes #3027, fixes #3039