css colon character fix port to python

Closes #446
Closes #418