Skip to content

Commit 1d72b41

Browse files
committed
fixs
1 parent d8a7c12 commit 1d72b41

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/Plesk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function curlInit($host, $login, $password)
6161
"HTTP_AUTH_LOGIN: {$login}",
6262
"HTTP_AUTH_PASSWD: {$password}",
6363
'HTTP_PRETTY_PRINT: TRUE',
64-
'Content-Type: text/xml'
64+
'Content-Type: text/xml; charset=UTF-8'
6565
]
6666
);
6767
return $this->curl;

src/Plugin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ function_requirements('get_webhosting_plesk_instance');
121121
if (!isset($data['name']) || trim($data['name']) == '') {
122122
$data['name'] = str_replace('@', ' ', $data['account_lid']);
123123
}
124+
$data['name'] = str_replace(['&',';'],['',''],$data['name']);
125+
if (mb_strpos($data['name'], ' ') !== false) {
126+
$nameParts = explode(' ', $data['name']);
127+
$data['name'] = $nameParts[0].' '.$nameParts[1];
128+
}
124129
$request = [
125130
'name' => $data['name'],
126131
'username' => $username,

0 commit comments

Comments
 (0)