Skip to content

Commit

Permalink
Fix: Add support for special characters (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
burhandodhy authored Feb 7, 2024
1 parent d196f1d commit b35126f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions includes/class-bc-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public static function sanitize_payload_args_recursive( $args ) {
if ( is_array( $value ) ) {
$args[ $index ] = self::sanitize_payload_args_recursive( $value );
} else {
$args[ $index ] = utf8_uri_encode( sanitize_text_field( $value ) );
$args[ $index ] = sanitize_text_field( $value );
}
}

Expand All @@ -329,7 +329,7 @@ public static function sanitize_payload_item( $item ) {
return self::sanitize_payload_args_recursive( $item );
}

return utf8_uri_encode( sanitize_text_field( $item ) );
return sanitize_text_field( $item );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion includes/sync/class-bc-videos.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function update_bc_video( $sanitized_post_data, $subtype = false ) {
$update_data = array();

if ( array_key_exists( 'name', $sanitized_post_data ) && '' !== $sanitized_post_data['name'] ) {
$update_data['name'] = utf8_uri_encode( sanitize_text_field( $sanitized_post_data['name'] ) );
$update_data['name'] = BC_Utility::sanitize_payload_item( $sanitized_post_data['name'] );
}

if ( array_key_exists( 'description', $sanitized_post_data ) && ! empty( $sanitized_post_data['description'] ) ) {
Expand Down

0 comments on commit b35126f

Please sign in to comment.