[bug][31878] Removing double error message and proper escaping. Fixes #1864