Apply `addslashes()` to strings in the `Config` class (see #6808)