Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions features/site.feature
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,14 @@ Feature: Manage sites in a multisite installation
"""
http://example.com/first
"""

Scenario: Create site with title containing slash
Given a WP multisite install
And I run `wp site create --slug=mysite --title="My\Site"`
Then STDOUT should not be empty

When I run `wp option get blogname --url=example.com/mysite`
Then STDOUT should be:
"""
My\Site
"""
1 change: 1 addition & 0 deletions php/commands/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ public function create( $_, $assoc_args ) {
}

$wpdb->hide_errors();
$title = wp_slash( $title );
$id = wpmu_create_blog( $newdomain, $path, $title, $user_id, array( 'public' => $public ), $network->id );
$wpdb->show_errors();
if ( !is_wp_error( $id ) ) {
Expand Down