node-wp-cli icon indicating copy to clipboard operation
node-wp-cli copied to clipboard

wp core install: title containing spaces gets escaped

Open sjoerdlo opened this issue 8 years ago • 2 comments

WP.core.install({"url":"http://localhost/mysite", "title":"site name", "admin_user":admin_user, "admin_password":admin_password, "admin_email":admin_email}, function(err, result) { });

After install the title will show as: site\ name

sjoerdlo avatar Apr 13 '16 11:04 sjoerdlo

escapeshell in utils.js seems to be the cause.

When replacing it with this escapeshellarg function: http://phpjs.org/functions/escapeshellarg/ it seems to work.

sjoerdlo avatar Apr 13 '16 13:04 sjoerdlo

@sjoerdlo: I've experienced this issue when using WP.core.download as well, which will then create a new folder called site\ name.

Have you already submitted a PR?

peterjohnhunt avatar Jun 16 '17 14:06 peterjohnhunt