Skip to content

Commit f360409

Browse files
author
Antti Kuosmanen
committed
Allow text field line breaks, don't translate the referrer field
1 parent 21bf33b commit f360409

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

inc/wplf-ajax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ function wplf_ajax_submit_handler() {
4646
// add submission data as meta values
4747
foreach( $_POST as $key => $value ) {
4848
if( !is_array($value) ) {
49-
add_post_meta($post_id, $key, sanitize_text_field( $value ), true);
49+
add_post_meta($post_id, $key, esc_html( $value ), true);
5050
}
5151
else {
52-
add_post_meta($post_id, $key, sanitize_text_field( json_encode( $value ) ), true);
52+
add_post_meta($post_id, $key, esc_html( json_encode( $value ) ), true);
5353
}
5454
}
5555

inc/wplf-form-actions.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ function wplf_send_email_copy( $return ) {
2323
if( '_' !== $key[0] ) {
2424
continue;
2525
}
26-
if( $key === 'referrer' ) {
27-
$key = __( 'referrer', 'wp-libre-form' );
28-
}
29-
3026
$content .= esc_html( $key ) . ': ' . esc_html( print_r( $value, true ) ) . "\n";
3127
}
3228
wp_mail( $to, $subject, $content );

0 commit comments

Comments
 (0)