quick fix for inconsistent space handling in replacement pattern between front and and chat pages