Moving test factories out of functional test package
Fixing unicode error when submitting rich content with HTML entity names. Fixing #47.