Fixes password string escaping

Closes-Bug: #1404533