Skip to content
Open
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
12 changes: 11 additions & 1 deletion class-jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion templates-admin/translation-editor-meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<?php echo $original->get_input( "bbl_translation[meta][{$key}]", $translation ); ?>
</div>
<div class="bbl-translation-original bbl-translation-original-meta_key">
<?php echo esc_html( $original->get_output() ); ?>
<?php echo wp_kses_post( $original->get_output() ); ?>
</div>

</div>
Expand Down