Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add support for special characters #373

Merged
merged 1 commit into from
Feb 7, 2024
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
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
Loading