Trim for HTML else jQuery treats it as expression.

This was causing the template inserted by nestedFields to be interpreted as CSS.