Fixed a bug when validating style containing apostrophe