Plugin Directory

Changeset 3194244


Ignore:
Timestamp:
11/21/2024 02:55:30 PM (15 months ago)
Author:
sided
Message:

Added security fix.

Location:
sided/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • sided/trunk/partials/functions.php

    r3090383 r3194244  
    125125            echo "<script>
    126126                window.sidedScriptPayload = window.sidedScriptPayload || {};
    127                 window.sidedScriptPayload.categories = ['" . implode("', '", $names) . "'];
     127                window.sidedScriptPayload.categories = ['" . implode("', '", esc_js($names)) . "'];
    128128            </script>";
    129129        }
     
    137137function sided_wpa_sided_initiate_script_callback()
    138138{
    139     echo update_option('sided_sided_initiate_script', sanitize_text_field($_POST['checked']));
     139    echo esc_js(update_option('sided_sided_initiate_script', sanitize_text_field($_POST['checked'])));
    140140    wp_die();
    141141}
     
    145145function sided_wpa_send_cats_to_sided_callback()
    146146{
    147     echo update_option('send_cats_to_sided', sanitize_text_field($_POST['checked']));
     147    echo esc_js(update_option('send_cats_to_sided', sanitize_text_field($_POST['checked'])));
    148148    wp_die();
    149149}
     
    153153function sided_wpa_send_tags_to_sided_callback()
    154154{
    155     echo update_option('send_tags_to_sided', sanitize_text_field($_POST['checked']));
     155    echo esc_js(update_option('send_tags_to_sided', sanitize_text_field($_POST['checked'])));
    156156    wp_die();
    157157}
     
    176176
    177177    if ($response_arr->status == 'success') {
    178         echo json_encode($response_arr->data, true);
     178        echo wp_json_encode($response_arr->data, true);
    179179    }
    180180    wp_die();
     
    198198        $response_arr = json_decode($response['body']);
    199199        if ($response_arr->status == 'success') {
    200             echo json_encode($response_arr->data, true);
     200            echo wp_json_encode($response_arr->data, true);
    201201        }
    202202    } else {
    203         echo $response->get_error_message();
     203        echo esc_html($response->get_error_message());
    204204    }
    205205    wp_die();
     
    211211{
    212212    $_POST['jsonObj']['updated_at'] = current_datetime();
    213     echo update_option('sided_sided_embed_placement_options', $_POST['jsonObj']);
     213    echo esc_js(update_option('sided_sided_embed_placement_options', esc_js($_POST['jsonObj'])));
    214214    wp_die();
    215215}
     
    225225function sided_kama_dynamic_sidebar_before_action($index, $has_widgets, $embed_code)
    226226{
    227     echo $embed_code;
     227    echo esc_js($embed_code);
    228228}
    229229
     
    282282
    283283    if ($response_arr->status == 'success') {
    284         echo json_encode($response_arr->data, true);
     284        echo wp_json_encode($response_arr->data, true);
    285285    }
    286286    wp_die();
     
    306306
    307307    if ($response_arr->status == 'success') {
    308         echo json_encode($response_arr->data, true);
     308        echo wp_json_encode($response_arr->data, true);
    309309    }
    310310    wp_die();
  • sided/trunk/partials/includes/sided-common-header.php

    r2976952 r3194244  
    1414    $networks_list = $response_gsdc_arr->data;
    1515  } else {
    16     echo $response_gsdc->get_error_message();
     16    echo esc_html($response_gsdc->get_error_message());
    1717  }
    1818
     
    4343<div class="common-header inline-content justify-content-between align-items-center">
    4444  <div class="inline-content align-items-center">
    45     <h1><strong>Sided</strong> WP Plugin <small>v<?php echo SIDED_VERSION; ?></small></h1>
     45    <h1><strong>Sided</strong> WP Plugin <small>v<?php echo esc_html(SIDED_VERSION); ?></small></h1>
    4646  </div>
    4747  <ul class="nav navbar inline-content justify-content-between">
  • sided/trunk/partials/includes/sided-settings-header.php

    r2976952 r3194244  
    22<div class="settings-header">
    33  <div class="inline-content align-items-center p-4">
    4     <img class="pe-4" src="<?php echo plugin_dir_url( __FILE__ ); ?>imgs/sided_favicon.jpg"/>
     4    <img class="pe-4" src="<?php echo esc_url(plugin_dir_url( __FILE__ )); ?>imgs/sided_favicon.jpg"/>
    55    <h2 class="ps-2">Activate Sided Plugin</h2>
    66  </div>
  • sided/trunk/partials/sided-create-debate-from-block.php

    r2986550 r3194244  
    4040if($status_aat !== 'Valid Token'){
    4141  echo '<script>
    42           window.location = "'.get_site_url().'/wp-admin/admin.php?page=settings";
     42          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=settings";
    4343        </script>';
    4444  exit;
     
    5353                                'x-source-type' => 'wp-plugin',
    5454                               'x-private-access-token'=> $sided_private_access_token ) ,
    55             'body' => json_encode($_POST, JSON_UNESCAPED_SLASHES),
     55            'body' => wp_json_encode($_POST, JSON_UNESCAPED_SLASHES),
    5656             );
    5757  $response = wp_remote_post( $url, $args);
     
    6666    }
    6767  } else {
    68     echo $response->get_error_message();
     68    echo esc_url($response->get_error_message());
    6969  }
    7070}
     
    8383  $debate_authors = $response_fda_arr->data;
    8484} else {
    85   echo $response_fda->get_error_message();
     85  echo esc_url($response_fda->get_error_message());
    8686}
    8787/* fetch debate authors end */
     
    9999  $debate_cats = $response_fcnc_arr->data;
    100100} else {
    101   echo $response_fcnc->get_error_message();
     101  echo esc_url($response_fcnc->get_error_message());
    102102}
    103103/* fetch Current network's cats end */
     
    115115  $current_user = $response_fcu_arr->status == 'success' ? $response_fcu_arr->data : '';
    116116} else {
    117   echo $response_fcu->get_error_message();
     117  echo esc_url($response_fcu->get_error_message());
    118118}
    119119/*fetch curret user details end*/
     
    343343            $('#generate-ai-polls').hide();
    344344            $('#reset-ai-polls').show();
    345             $('.smartPollContent').append('<div class="debatePreviewInner"><div class="debatePreviewHeader"><div class="d-flex"><div class="author"><a target="_blank" rel="noreferrer" class="small-dp user-color-green" href="/<?php echo $current_user->username; ?>" tabindex="0"><img data-src="" src="<?php echo esc_attr($current_user->avatarObject->thumb->location); ?>" alt="Superadmin" class="sidedLazyLoad img-circle avatar" style="border-color: rgb(219, 219, 219);"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-check" class="svg-inline--fa fa-circle-check procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="color: rgb(31, 170, 115);"><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"></path></svg></a><div class="copy-wrap"><a target="_blank" rel="noreferrer" class="authorname" href="/<?php echo $current_user->username; ?>" tabindex="0"><h6><?php echo $current_user->name; ?></h6></a><a rel="noreferrer" target="_blank" href="/<?php echo $current_user->username; ?>" class="authorhandle"><span><?php echo $current_user->username; ?></span></a></div></div><button type="button" class="selectPollBtn btn btn-primary" data-index="'+key+'">Select Poll</button></div></div><div class="debatePreviewTitle mt-3"><h6>'+value['thesis']+'</h6></div><div class="debatePreviewSides mt-2">'+sidesHTML+'</div></div>').show();
     345            $('.smartPollContent').append('<div class="debatePreviewInner"><div class="debatePreviewHeader"><div class="d-flex"><div class="author"><a target="_blank" rel="noreferrer" class="small-dp user-color-green" href="/<?php echo esc_attr($current_user->username); ?>" tabindex="0"><img data-src="" src="<?php echo esc_attr($current_user->avatarObject->thumb->location); ?>" alt="Superadmin" class="sidedLazyLoad img-circle avatar" style="border-color: rgb(219, 219, 219);"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-check" class="svg-inline--fa fa-circle-check procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="color: rgb(31, 170, 115);"><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"></path></svg></a><div class="copy-wrap"><a target="_blank" rel="noreferrer" class="authorname" href="/<?php echo esc_attr($current_user->username); ?>" tabindex="0"><h6><?php echo esc_attr($current_user->name); ?></h6></a><a rel="noreferrer" target="_blank" href="/<?php echo esc_attr($current_user->username); ?>" class="authorhandle"><span><?php echo esc_attr($current_user->username); ?></span></a></div></div><button type="button" class="selectPollBtn btn btn-primary" data-index="'+key+'">Select Poll</button></div></div><div class="debatePreviewTitle mt-3"><h6>'+value['thesis']+'</h6></div><div class="debatePreviewSides mt-2">'+sidesHTML+'</div></div>').show();
    346346          });
    347347        },
  • sided/trunk/partials/sided-create-debate.php

    r2986550 r3194244  
    55if($status_aat !== 'Valid Token'){
    66  echo '<script>
    7           window.location = "'.get_site_url().'/wp-admin/admin.php?page=settings";
     7          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=settings";
    88        </script>';
    99  exit;
     
    1818                                'x-source-type' => 'wp-plugin',
    1919                               'x-private-access-token'=> esc_js($sided_private_access_token) ) ,
    20             'body' => json_encode($_POST, JSON_UNESCAPED_SLASHES),
     20            'body' => wp_json_encode($_POST, JSON_UNESCAPED_SLASHES),
    2121             );
    2222  $response = wp_remote_post( $url, $args);
     
    3232    }
    3333  } else {
    34     echo $response->get_error_message();
     34    echo esc_html($response->get_error_message());
    3535  }
    3636}
     
    5151  //echo '<pre>'; print_r($debate_authors); echo '</pre>';
    5252} else {
    53   echo $response_fda->get_error_message();
     53  echo esc_html($response_fda->get_error_message());
    5454}
    5555
     
    6868  $debate_cats = $response_fcnc_arr->data;
    6969} else {
    70   echo $response_fcnc->get_error_message();
     70  echo esc_html($response_fcnc->get_error_message());
    7171}
    7272/* fetch Current network's cats end */
     
    8484  $current_user = $response_fcu_arr->status == 'success' ? $response_fcu_arr->data : '';
    8585} else {
    86   echo $response_fcu->get_error_message();
     86  echo esc_html($response_fcu->get_error_message());
    8787}
    8888/*fetch curret user details end*/
     
    103103  }
    104104} else {
    105   echo $response_fba->get_error_message();
     105  echo esc_html($response_fba->get_error_message());
    106106}
    107107/*fetch brand account details end*/
     
    329329            $('#generate-ai-polls').hide();
    330330            $('#reset-ai-polls').show();
    331             $('.smartPollContent').append('<div class="debatePreviewInner"><div class="debatePreviewHeader"><div class="d-flex"><div class="author"><a target="_blank" rel="noreferrer" class="small-dp user-color-green" href="/<?php echo $current_user->username; ?>" tabindex="0"><img data-src="" src="<?php echo esc_attr($current_user->avatarObject->thumb->location); ?>" alt="Superadmin" class="sidedLazyLoad img-circle avatar" style="border-color: rgb(219, 219, 219);"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-check" class="svg-inline--fa fa-circle-check procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="color: rgb(31, 170, 115);"><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"></path></svg></a><div class="copy-wrap"><a target="_blank" rel="noreferrer" class="authorname" href="/<?php echo $current_user->username; ?>" tabindex="0"><h6><?php echo $current_user->name; ?></h6></a><a rel="noreferrer" target="_blank" href="/<?php echo $current_user->username; ?>" class="authorhandle"><span><?php echo $current_user->username; ?></span></a></div></div><button type="button" class="selectPollBtn btn btn-primary" data-index="'+key+'">Select Poll</button></div></div><div class="debatePreviewTitle mt-3"><h6>'+value['thesis']+'</h6></div><div class="debatePreviewSides mt-2">'+sidesHTML+'</div></div>').show();
     331            $('.smartPollContent').append('<div class="debatePreviewInner"><div class="debatePreviewHeader"><div class="d-flex"><div class="author"><a target="_blank" rel="noreferrer" class="small-dp user-color-green" href="/<?php echo esc_attr($current_user->username); ?>" tabindex="0"><img data-src="" src="<?php echo esc_attr($current_user->avatarObject->thumb->location); ?>" alt="Superadmin" class="sidedLazyLoad img-circle avatar" style="border-color: rgb(219, 219, 219);"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-check" class="svg-inline--fa fa-circle-check procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="color: rgb(31, 170, 115);"><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"></path></svg></a><div class="copy-wrap"><a target="_blank" rel="noreferrer" class="authorname" href="/<?php echo esc_attr($current_user->username); ?>" tabindex="0"><h6><?php echo esc_attr($current_user->name); ?></h6></a><a rel="noreferrer" target="_blank" href="/<?php echo esc_attr($current_user->username); ?>" class="authorhandle"><span><?php echo esc_attr($current_user->username); ?></span></a></div></div><button type="button" class="selectPollBtn btn btn-primary" data-index="'+key+'">Select Poll</button></div></div><div class="debatePreviewTitle mt-3"><h6>'+value['thesis']+'</h6></div><div class="debatePreviewSides mt-2">'+sidesHTML+'</div></div>').show();
    332332          });
    333333        },
     
    660660               <div class="debatePreviewHeader">
    661661                  <div class="author">
    662                      <a target="_blank" rel="noreferrer" class="small-dp user-color-green" href="/<?php echo $current_user->username; ?>" tabindex="0">
     662                     <a target="_blank" rel="noreferrer" class="small-dp user-color-green" href="/<?php echo esc_attr($current_user->username); ?>" tabindex="0">
    663663                        <img data-src="" src="<?php echo esc_attr($current_user->avatarObject->thumb->location); ?>" alt="Super Admin" class="sidedLazyLoad img-circle avatar" style="border-color: rgb(219, 219, 219);">
    664664                        <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check-circle" class="svg-inline--fa fa-check-circle fa-w-16 procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="color: rgb(31, 170, 115);">
     
    667667                     </a>
    668668                     <div class="copy-wrap">
    669                         <a target="_blank" rel="noreferrer" class="authorname" href="/<?php echo $current_user->username; ?>" tabindex="0">
     669                        <a target="_blank" rel="noreferrer" class="authorname" href="/<?php echo esc_attr($current_user->username); ?>" tabindex="0">
    670670                           <h6><?php echo esc_html($current_user->name); ?></h6>
    671671                        </a>
    672                         <a rel="noreferrer" class="authorhandle"><span class="handler">Posted <?php echo date('M d, Y'); ?></span></a>
     672                        <a rel="noreferrer" class="authorhandle"><span class="handler">Posted <?php echo esc_js(gmdate('M d, Y')); ?></span></a>
    673673                     </div>
    674674                  </div>
  • sided/trunk/partials/sided-dashboard.php

    r3029321 r3194244  
    2020if($status_aat !== 'No Token'){
    2121    echo '<script>
    22           window.location = "'.get_site_url().'/wp-admin/admin.php?page=settings";
     22          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=settings";
    2323        </script>';
    2424    exit;
  • sided/trunk/partials/sided-debates.php

    r2976952 r3194244  
    44if($status_aat == 'No Token'){
    55  echo '<script>
    6           window.location = "'.get_site_url().'/wp-admin/admin.php?page=dashboard";
     6          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=dashboard";
    77        </script>';
    88  exit;
     
    1010if($status_aat != 'Valid Token'){
    1111  echo '<script>
    12           window.location = "'.get_site_url().'/wp-admin/admin.php?page=settings";
     12          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=settings";
    1313        </script>';
    1414  exit;
     
    5050echo '<div class="settings-header">
    5151  <div class="inline-content align-items-center p-4 common-form">
    52     <img class="pe-4" src="'.plugin_dir_url( __FILE__ ).'includes/imgs/sided_favicon.jpg"/>
     52    <img class="pe-4" src="'.esc_url(plugin_dir_url( __FILE__ )).'includes/imgs/sided_favicon.jpg"/>
    5353    <h2 class="ps-2 pe-4">'.esc_html($debates_count).'<small>Total Polls</small></h2>
    5454    <h2 class="ps-2 pe-4">'.esc_html($active_debates_count).'<small>Active Polls</small></h2>
     
    9494           </td>
    9595           <td>'.esc_html($status).'</td>
    96            <td>'.date_format(date_create($debate->startedAt) , 'm/d/y').'</td>
     96           <td>'.esc_js(date_format(date_create($debate->startedAt) , 'm/d/y')).'</td>
    9797           <td><a class="copyEmbedShortcode '.esc_attr($disabled_copy_shortcode).'" data-debId="'.esc_attr($debate->id).'" href="javascript:void(0);">Copy</a></td>
    9898           <td>
     
    176176    <script type="text/javascript">
    177177    $.ajax({
    178       url: "https://stage-api.sided.co/debate/getDebatesList?clientId=<?php echo $selected_network; ?>&perPage=<?php echo $results_per_page; ?>&pageNumber=<?php echo $page_number.$search_qstring; ?>",
     178      url: "https://stage-api.sided.co/debate/getDebatesList?clientId=<?php echo esc_js($selected_network); ?>&perPage=<?php echo esc_js($results_per_page); ?>&pageNumber=<?php echo esc_js($page_number.$search_qstring); ?>",
    179179       headers: { 'x-source-type' : 'wp-plugin',
    180                                'x-private-access-token': "<?php echo $sided_private_access_token; ?>" },
     180                               'x-private-access-token': "<?php echo esc_js($sided_private_access_token); ?>" },
    181181      context: document.body,
    182182      success: function (data) {
  • sided/trunk/partials/sided-edit-debate.php

    r2986550 r3194244  
    55if($status_aat !== 'Valid Token'){
    66  echo '<script>
    7           window.location = "'.get_site_url().'/wp-admin/admin.php?page=settings";
     7          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=settings";
    88        </script>';
    99  exit;
     
    3232    }
    3333  } else {
    34     echo $response->get_error_message();
     34    echo esc_html($response->get_error_message());
    3535  }
    3636}
     
    5858    }
    5959  } else {
    60     echo $response->get_error_message();
     60    echo esc_html($response->get_error_message());
    6161  }
    6262}
     
    8383    }
    8484  } else {
    85     echo $response->get_error_message();
     85    echo esc_html($response->get_error_message());
    8686  }
    8787  //echo '<pre>'; print_r($response_arr->message); echo '</pre>';
     
    106106      if($curr_debate->clientId != $selected_network){
    107107        echo '<script>
    108           window.location = "'.get_site_url().'/wp-admin/admin.php?page=dashboard";
     108          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=dashboard";
    109109        </script>';
    110110      }
     
    114114
    115115    $isNoEndDate = $curr_debate->endedAt == '' ? true : false;
    116     $endDate = $curr_debate->endedAt == null ? date('Y-m-d') : $curr_debate->endedAt;
     116    $endDate = $curr_debate->endedAt == null ? gmdate('Y-m-d') : $curr_debate->endedAt;
    117117  } else {
    118     echo $response->get_error_message();
     118    echo esc_html($response->get_error_message());
    119119  }
    120120}
     
    156156}
    157157} else {
    158   echo $response_fcdi->get_error_message();
     158  echo esc_html($response_fcdi->get_error_message());
    159159}
    160160/* fetch currentDomainId end */
     
    171171  $debate_authors = $response_fda_arr->data;
    172172} else {
    173   echo $response_fda->get_error_message();
     173  echo esc_html($response_fda->get_error_message());
    174174}
    175175/* fetch debate authors end */
     
    186186  $debate_cats = $response_fcnc_arr->data;
    187187} else {
    188   echo $response_fcnc->get_error_message();
     188  echo esc_html($response_fcnc->get_error_message());
    189189}
    190190/* fetch Current network's cats end */
     
    202202  //echo '<pre>'; print_r($embed_placements); echo '</pre>';
    203203} else {
    204   echo $response_ep->get_error_message();
     204  echo esc_html($response_ep->get_error_message());
    205205}
    206206/* Fetch Embed placements Data End */
     
    218218  //echo '<pre>'; print_r($categories_list); echo '</pre>';
    219219} else {
    220   echo $response_fcl->get_error_message();
     220  echo esc_html($response_fcl->get_error_message());
    221221}
    222222/* Fetch Embed placements Data End */
     
    446446      $side_count = 0;
    447447      foreach($curr_debate->sides as $side){
    448         echo '<input type="hidden" name="sides['.$side_count.'][id]" value="'.$side->id.'"><input type="hidden" name="sides['.$side_count.'][text]" value="'.$side->text.'">';
     448        echo '<input type="hidden" name="sides['.esc_js($side_count).'][id]" value="'.esc_attr($side->id).'"><input type="hidden" name="sides['.esc_js($side_count).'][text]" value="'.esc_attr($side->text).'">';
    449449        $side_count++;
    450450      }
     
    476476                        <span class="votesPercentage">'.round(((int)$side->votes * 100 / (int)$curr_debate->votes), 2).'%</span>' : '';
    477477              $disabled = $side->link && $side->link !='' ? 'disabled' : '';
    478               echo '<div class="side" data-sideindex="'.$side_count.'">
     478              echo '<div class="side" data-sideindex="'.esc_js($side_count).'">
    479479                      <div class="message position-relative">
    480480                        <div class="row-1 d-flex align-items-center">
     
    483483                            <p class="form-control mb-0" style="border-color: '.esc_attr($side->sideColor).'; background: '.esc_attr($side->sideColor).'26;">'.esc_html($side->text).'</p>
    484484                          </div>
    485                           <button type="button" data-type="link" class="side-link ms-2 btn btn-secondary-light btn-sm" '.$disabled.'><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="link" class="svg-inline--fa fa-link procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"></path></svg></button>
     485                          <button type="button" data-type="link" class="side-link ms-2 btn btn-secondary-light btn-sm" '.esc_js($disabled).'><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="link" class="svg-inline--fa fa-link procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"></path></svg></button>
    486486                          <button type="button" data-type="tag" class="side-tag ms-2 btn btn-secondary-light btn-sm"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="tag" class="svg-inline--fa fa-tag procheckmark flip" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"></path></svg>+</button>
    487487                        </div>
     
    490490
    491491                        if($side->link && $side->link !=''){
    492                           echo '<span class="sideLink"><input type="hidden" name="sides['.$side_count.'][link]" value="'.$side->link.'" readonly><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="link" class="svg-inline--fa fa-link procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"></path></svg><a class="d-inline" rel="noreferrer" href="'.$side->link.'" target="_blank">'.$side->link.'</a><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-xmark" class="svg-inline--fa fa-circle-xmark procheckmark flip" role="button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"></path></svg></span>';
     492                          echo '<span class="sideLink"><input type="hidden" name="sides['.esc_js($side_count).'][link]" value="'.esc_url($side->link).'" readonly><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="link" class="svg-inline--fa fa-link procheckmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"></path></svg><a class="d-inline" rel="noreferrer" href="'.esc_url($side->link).'" target="_blank">'.esc_url($side->link).'</a><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-xmark" class="svg-inline--fa fa-circle-xmark procheckmark flip" role="button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"></path></svg></span>';
    493493                        }
    494494
     
    496496                          $tag_count = 0;
    497497                          foreach($side->tags as $side_tag){
    498                             echo '<span class="sideTags"><input type="hidden" name="sides['.$side_count.'][tags]['.$tag_count.'][text]" value="'.$side_tag->text.'" readonly><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="tag" class="svg-inline--fa fa-tag procheckmark flip" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"></path></svg>'.$side_tag->text.'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-xmark" class="svg-inline--fa fa-circle-xmark procheckmark flip" role="button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"></path></svg></span>';
     498                            echo '<span class="sideTags"><input type="hidden" name="sides['.esc_js($side_count).'][tags]['.esc_js($tag_count).'][text]" value="'.esc_html($side_tag->text).'" readonly><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="tag" class="svg-inline--fa fa-tag procheckmark flip" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"></path></svg>'.esc_html($side_tag->text).'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-xmark" class="svg-inline--fa fa-circle-xmark procheckmark flip" role="button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"></path></svg></span>';
    499499                            $tag_count++;
    500500                          }
     
    612612              <?php } ?>
    613613              <?php if($sel_debate_data && $sel_debate_data->embedDomainCategories !== ''){ ?>
    614                 <a onclick="showDeployDebateModal('tab-category');" class="linkActive" title="Deploy to Category">Deployed to <?php echo $sel_debate_data->embedDomainCategories; ?></a>
     614                <a onclick="showDeployDebateModal('tab-category');" class="linkActive" title="Deploy to Category">Deployed to <?php echo esc_attr($sel_debate_data->embedDomainCategories); ?></a>
    615615              <?php } else { ?>
    616616                <a onclick="showDeployDebateModal('tab-category');" class="linkActive" title="Deploy to Category">Deploy to Category</a>
     
    636636                           <h6><?php echo esc_html($curr_debate->user->name); ?></h6>
    637637                        </a>
    638                         <a rel="noreferrer" class="authorhandle"><span class="handler">Posted <?php echo date_format(date_create($curr_debate->startedAt) , 'M d, Y'); ?></span></a>
     638                        <a rel="noreferrer" class="authorhandle"><span class="handler">Posted <?php echo esc_js(date_format(date_create($curr_debate->startedAt) , 'M d, Y')); ?></span></a>
    639639                     </div>
    640640                  </div>
     
    650650               <span class="lightColorSpan mt-2 d-block">
    651651                <?php if($curr_debate->isClosed) { ?>
    652                   <span className="lightColorSpan mt-2 d-block">Poll ended <?php echo date_format(date_create($curr_debate->endedAt) , 'M d, Y'); ?></span>
     652                  <span className="lightColorSpan mt-2 d-block">Poll ended <?php echo esc_js(date_format(date_create($curr_debate->endedAt) , 'M d, Y')); ?></span>
    653653                <?php } else {
    654654                    $date1=date_create($curr_debate->endedAt);
    655                     $date2=date_create(date("Y-m-d"));
     655                    $date2=date_create(gmdate("Y-m-d"));
    656656                    $diff=date_diff($date1,$date2);
    657657                    $final_difference = $diff->y ? esc_html($diff->y) . ' year(s)' : ($diff->m ? esc_html($diff->m) .' month(s)' : ($diff->d ? esc_html($diff->d) .' day(s)' : ($diff->h ? esc_html($diff->h) . ' hour(s)' : ($diff->i ? esc_html($diff->i) . ' min(s)' : ($diff->s ? esc_html($diff->s).' sec(s)' : '')))));
     
    687687        </svg>
    688688        <form method="post" class="deploy-debate-form sidedCustomTabsContent">
    689           <input type="hidden" value="<?php echo $curr_debate->id; ?>" name="debateId">
    690           <input type="hidden" value="<?php echo $currentDomainId;
     689          <input type="hidden" value="<?php echo esc_attr($curr_debate->id); ?>" name="debateId">
     690          <input type="hidden" value="<?php echo esc_js($currentDomainId);
    691691           ?>" name="embedDomainId">
    692           <input type="hidden" value="<?php echo $curr_debate->clientId; ?>" name="currDebateClientId">
     692          <input type="hidden" value="<?php echo esc_attr($curr_debate->clientId); ?>" name="currDebateClientId">
    693693          <div class="tabContent" id="tab-category" style="display: none;">
    694694            <div class="mb-3 d-flex justify-content-between">
     
    708708                        class="sided-checkbox1"
    709709                        onclick="checkAll(this);"
    710                         <?php echo $is_allCats_checked; ?>
     710                        <?php echo esc_js($is_allCats_checked); ?>
    711711                      />Available categories (<?php echo count($categories_list); ?>)
    712712                  </label>
     
    726726                              type="checkbox"
    727727                              class="sided-checkbox"
    728                               value="'.$category->text.'"
    729                               '.$checked.'
     728                              value="'.esc_attr($category->text).'"
     729                              '.esc_js($checked).'
    730730                            />
    731                             '.$category->text.'
     731                            '.esc_attr($category->text).'
    732732                         
    733733                      </label>
     
    758758                        class="sided-checkbox1"
    759759                        onclick="checkAll(this);"
    760                         <?php echo $is_allPlacement_checked; ?>
     760                        <?php echo esc_js($is_allPlacement_checked); ?>
    761761                      />Available placements (<?php echo count($embed_placements); ?>)
    762762                </label>
     
    776776                              type="checkbox"
    777777                              class="sided-checkbox"
    778                               value="'.$embed_placement->id.'"
    779                               '.$checked.'
     778                              value="'.esc_attr($embed_placement->id).'"
     779                              '.esc_js($checked).'
    780780                            />
    781                             '.$embed_placement->placementName.'
     781                            '.esc_attr($embed_placement->placementName).'
    782782                      </label>
    783783                    </div>';
     
    794794        <?php if($sel_debate_data_key !== false) { ?>
    795795          <form method="post" class="remove-debate-form" id="remove-debate-form">
    796             <input type="hidden" value="<?php echo $curr_debate->id; ?>" name="debateId">
    797             <input type="hidden" value="<?php echo $currentDomainId;
     796            <input type="hidden" value="<?php echo esc_attr($curr_debate->id); ?>" name="debateId">
     797            <input type="hidden" value="<?php echo esc_js($currentDomainId);
    798798             ?>" name="embedDomainId">
    799             <input type="hidden" value="<?php echo $curr_debate->clientId; ?>" name="currDebateClientId">
     799            <input type="hidden" value="<?php echo esc_attr($curr_debate->clientId); ?>" name="currDebateClientId">
    800800            <input type="hidden" value="true" name="remove_poll">
    801801          </form>
  • sided/trunk/partials/sided-edit-draft.php

    r2976952 r3194244  
    55if($status_aat !== 'Valid Token'){
    66  echo '<script>
    7           window.location = "'.get_site_url().'/wp-admin/admin.php?page=settings";
     7          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=settings";
    88        </script>';
    99  exit;
     
    5252      if($curr_debate->clientId != $selected_network){
    5353        echo '<script>
    54           window.location = "'.get_site_url().'/wp-admin/admin.php?page=dashboard";
     54          window.location = "'.esc_url(get_site_url()).'/wp-admin/admin.php?page=dashboard";
    5555        </script>';
    5656      }
     
    6060
    6161  $isNoEndDate = $curr_debate->endedAt == '' ? true : false;
    62   $endDate = $curr_debate->endedAt == null ? date('Y-m-d') : $curr_debate->endedAt;
     62  $endDate = $curr_debate->endedAt == null ? gmdate('Y-m-d') : $curr_debate->endedAt;
    6363}
    6464/* Get Current Poll Data End */
     
    250250        minDate: moment('<?php echo esc_js($curr_debate->startedAt) ?>')['_d'],
    251251        startDate: moment('<?php echo esc_js($endDate); ?>')['_d'],
    252         //maxDate: app.sn_max_debate_duration != '' ? moment('<?php echo $curr_debate->startedAt ?>').add(app.sn_max_debate_duration, 'days') : '',
     252        //maxDate: app.sn_max_debate_duration != '' ? moment('<?php echo esc_js($curr_debate->startedAt) ?>').add(app.sn_max_debate_duration, 'days') : '',
    253253        timePicker: true,
    254254        locale: {
     
    450450                           <h6><?php echo esc_html($curr_debate->user->name); ?></h6>
    451451                        </a>
    452                         <a rel="noreferrer" class="authorhandle"><span class="handler">Posted <?php echo date_format(date_create($curr_debate->startedAt) , 'M d, Y'); ?></span></a>
     452                        <a rel="noreferrer" class="authorhandle"><span class="handler">Posted <?php echo esc_js(date_format(date_create($curr_debate->startedAt) , 'M d, Y')); ?></span></a>
    453453                     </div>
    454454                  </div>
     
    464464               <span class="lightColorSpan mt-2 d-block">
    465465                <?php if($curr_debate->isClosed) { ?>
    466                   <span className="lightColorSpan mt-2 d-block">Poll ended <?php echo date_format(date_create($curr_debate->endedAt) , 'M d, Y'); ?></span>
     466                  <span className="lightColorSpan mt-2 d-block">Poll ended <?php echo esc_js(date_format(date_create($curr_debate->endedAt) , 'M d, Y')); ?></span>
    467467                <?php } else {
    468468                    $date1=date_create($curr_debate->endedAt);
    469                     $date2=date_create(date("Y-m-d"));
     469                    $date2=date_create(gmdate("Y-m-d"));
    470470                    $diff=date_diff($date1,$date2);
    471471                    $final_difference = $diff->y ? esc_html($diff->y) . ' year(s)' : ($diff->m ? esc_html($diff->m) .' month(s)' : ($diff->d ? esc_html($diff->d) .' day(s)' : ($diff->h ? esc_html($diff->h) . ' hour(s)' : ($diff->i ? esc_html($diff->i) . ' min(s)' : ($diff->s ? esc_html($diff->s).' sec(s)' : '')))));
  • sided/trunk/partials/sided-settings.php

    r3033309 r3194244  
    181181    function fetch_selected_placements(){
    182182        $('#placement-option-wrapper').html('');
    183         var dataArray = $.parseJSON('<?php echo json_encode($placement_options_array); ?>');
     183        var dataArray = $.parseJSON('<?php echo wp_json_encode($placement_options_array); ?>');
    184184        if(dataArray == ''){ $(".select_network").trigger("change"); }
    185185        $.each(dataArray , function(key, value){
  • sided/trunk/readme.txt

    r3090385 r3194244  
    55Requires at least: 4.7
    66Tested up to: 6.5.3
    7 Stable tag: 1.4.2
     7Stable tag: 1.4.3
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    3838
    3939== Changelog ==
     40= 1.4.3 =
     41* Bugfix
     42
    4043= 1.4.2 =
    4144* Bugfix
  • sided/trunk/sided.php

    r3090385 r3194244  
    44* Plugin URI: https://sided.co/
    55* Description: It is a wordpress plugin to embed sided polls in your Wordpress website.
    6 * Version: 1.4.2
     6* Version: 1.4.3
    77* Author: Sided
    88**/
    99
    10 define( 'SIDED_VERSION', '1.4.2' );
     10define( 'SIDED_VERSION', '1.4.3' );
    1111define( 'SIDED_PLUGIN', __FILE__ );
    1212define( 'SIDED_PLUGIN_DIR', untrailingslashit( dirname( SIDED_PLUGIN ) ) );
Note: See TracChangeset for help on using the changeset viewer.