Parse js params, remove extra whitespaces, remove explicit div tag