WL-3274 Don't fall on bad style attributes.

If the style attribute didn't contain a semicolon then you get an index out of bounds exception. Now we use a regexp so we don't require a trailing colon.
Fixed typo.
Merge commit '0702e501552d9f0b2bb13b7ab91fe9da45d54036' into sakai-10.x