HUE-1332 [beeswax] Smarter escaping of semicolon

Simple algorithm, not the most elegant implementation