Fixed the style attribute value normalization

The regular expression replace here was done only for the first match. I added the global flag to it.