complex categories

added code that pre-parses the category before placing it in the preview form
and adds an error message for categories that cannot be parsed.

Bug 65620

Change-Id: I6712e6723c0dcac705cb6ccb9e5430711f60cb07