Use correct escaping function. props duck_.
Core Update: Fix a issue which caused automatic upgrades from 2.7 to 3.5+ to fail. Pre-2.7 WP_Filesystem::wp_content_dir() returned unslashed paths. Introduced in [22227].

Merges [23297] to the 3.5 branch.

props dd32
fixes #23177