Skip to content

Commit

Permalink
#4326 - Added Escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
WasimM3 committed May 20, 2020
1 parent 2107d71 commit 0f2a38f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions includes/redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function ampforwp_redirection() {
$go_to_url = home_url(add_query_arg($_GET,$wp->request));
$go_to_url = str_replace("/amp", '', $go_to_url);
$go_to_url = remove_query_arg('amp',$go_to_url);
wp_safe_redirect( $go_to_url );
wp_safe_redirect( esc_url($go_to_url) );
exit;
}
}else if(is_single()){
Expand All @@ -105,7 +105,7 @@ function ampforwp_redirection() {
$go_to_url = home_url(add_query_arg($_GET,$wp->request));
$go_to_url = str_replace("/amp", '', $go_to_url);
$go_to_url = remove_query_arg('amp',$go_to_url);
wp_safe_redirect( $go_to_url );
wp_safe_redirect( esc_url($go_to_url) );
exit;
}
}
Expand Down
8 changes: 4 additions & 4 deletions templates/features.php
Original file line number Diff line number Diff line change
Expand Up @@ -8462,10 +8462,10 @@ function ampforwp_update_taxonomy_meta($term_id, $term_id1){

if ( isset( $_REQUEST['taxonomy'] )) {
$taxonomy = $_REQUEST['taxonomy'];
add_action('edited_'.$taxonomy, 'ampforwp_update_taxonomy_meta',10,2);
add_action('create_'.$taxonomy, 'ampforwp_save_taxonomy_meta', 10);
add_action('edited_'.$taxonomy, 'ampforwp_update_taxonomy_meta',10,2);
add_action('create_'.$taxonomy, 'ampforwp_save_taxonomy_meta', 10);
add_action('edited_'.esc_attr($taxonomy), 'ampforwp_update_taxonomy_meta',10,2);
add_action('create_'.esc_attr($taxonomy), 'ampforwp_save_taxonomy_meta', 10);
add_action('edited_'.esc_attr($taxonomy), 'ampforwp_update_taxonomy_meta',10,2);
add_action('create_'.esc_attr($taxonomy), 'ampforwp_save_taxonomy_meta', 10);
if($taxonomy!='category' && isset($_REQUEST['tag_ID'])){
add_action ( 'edit_tag_form_fields', 'ampforwp_extra_category_fields');
}else{
Expand Down

0 comments on commit 0f2a38f

Please sign in to comment.