Make regex work correctly for function serialization across browsers - fixes T3495

Test Plan:
- Open http://127.0.0.1:8080/computing/computer-programming/html-css/intro-to-css/p/challenge-colorful-creature?mp-r-id=TlQuTIc=
 in IE11, see descriptions for every step (especially last 2)

Auditors: alexrodrigues