Skip to content

Commit ea86fc5

Browse files
authored
Merge pull request #218 from BoldGrid/pro-issue-144
fixes pro #144
2 parents 398d595 + f1b6ecf commit ea86fc5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

includes/class-notification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ public function get_merge_value( $tag ) {
430430
break;
431431

432432
case 'url_referer':
433-
return isset( $_SERVER['HTTP_REFERER'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : '';
433+
return isset( $_SERVER['HTTP_REFERER'] ) ? sanitize_url( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : '';
434434
break;
435435

436436
case 'url_login':

includes/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function weforms_insert_entry( $args, $fields = [] ) {
224224
'user_id' => get_current_user_id(),
225225
'user_ip' => ip2long( weforms_get_client_ip() ),
226226
'user_device' => $browser['name'] . '/' . $browser['platform'],
227-
'referer' => isset( $_SERVER['HTTP_REFERER'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : '',
227+
'referer' => isset( $_SERVER['HTTP_REFERER'] ) ? sanitize_url( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : '',
228228
'created_at' => current_time( 'mysql' )
229229
];
230230

0 commit comments

Comments
 (0)