diff --git a/class-jobs.php b/class-jobs.php index 4e1485a..2136eb0 100755 --- a/class-jobs.php +++ b/class-jobs.php @@ -677,7 +677,17 @@ public function save_job( $job_id, WP_Post $job ) { foreach ( $objects['meta'] as $meta_key => $meta_field ) { - $value = wp_kses_post( $meta_data[ $meta_key ] ); + $value = $meta_data[ $meta_key ]; + + $value = $meta_field->update( $value, $job ); + + // If the Babble_Meta_Field object update mathod as returned + // something that is not a string, it will break if we apply + // wp_kses to it + // @TODO: Perhaps there's some kind of wp_kses_deep we can use? Would that cause issues with some field/data types? + if ( is_string( $value ) ) { + $value = wp_kses_post( $value ); + } update_post_meta( $job->ID, "bbl_meta_{$meta_key}", $value ); diff --git a/templates-admin/translation-editor-meta.php b/templates-admin/translation-editor-meta.php index c741390..2793a96 100644 --- a/templates-admin/translation-editor-meta.php +++ b/templates-admin/translation-editor-meta.php @@ -12,7 +12,7 @@ get_input( "bbl_translation[meta][{$key}]", $translation ); ?>