Added content trim for label initialization

Since `lib.encodeHTML` will encode space character, bug Label should
escape these