Changeset 3024997
- Timestamp:
- 01/22/2024 09:23:33 AM (2 years ago)
- Location:
- ptoffice-sign-ups/trunk
- Files:
-
- 7 edited
-
assets/js/pto-admin-custom.js (modified) (1 diff)
-
includes/pto-setting-tab.php (modified) (9 diffs)
-
includes/pto_manage_volunteer/pto_manage_volunteer.php (modified) (3 diffs)
-
includes/pto_sign_ups_project_tabs/pto_sign_ups_reports.php (modified) (3 diffs)
-
pto_frontend/assets/js/pto-custom.js (modified) (1 diff)
-
ptoffice.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ptoffice-sign-ups/trunk/assets/js/pto-admin-custom.js
r2774823 r3024997 2393 2393 jQuery('#postimagediv').append('<p style="padding-left:10px" class="banner-design">Please upload this dimension image <b> (1920*600)</b></p>'); 2394 2394 }, 100); 2395 jQuery( document ).on( 'keypress' , "input" , function(){ 2396 // Get the pressed key's character code 2397 const charCode = event.charCode || event.keyCode; 2398 console.log(charCode); 2399 // Define the list of disallowed characters (`,`, `[`, `]`, `{`, `}`) 2400 const disallowedChars = [44, 91, 93, 123, 125,92,34,60,62]; 2401 2402 // Check if the pressed key is in the disallowed list 2403 if (disallowedChars.includes(charCode)) { 2404 swal({ 2405 text: "This character is not allowed. Please try another.", 2406 icon: "warning", 2407 buttons: true, 2408 dangerMode: true, 2409 }) 2410 event.preventDefault(); // Prevent the character from being entered 2411 } 2412 }); 2413 jQuery( document ).on( 'keypress' , "textarea" , function(){ 2414 // Get the pressed key's character code 2415 const charCode = event.charCode || event.keyCode; 2416 console.log(charCode); 2417 // Define the list of disallowed characters (`,`, `[`, `]`, `{`, `}`) 2418 const disallowedChars = [44, 91, 93, 123, 125,92,34,60,62]; 2419 2420 // Check if the pressed key is in the disallowed list 2421 if (disallowedChars.includes(charCode)) { 2422 swal({ 2423 text: "This character is not allowed. Please try another.", 2424 icon: "warning", 2425 buttons: true, 2426 dangerMode: true, 2427 }) 2428 event.preventDefault(); // Prevent the character from being entered 2429 } 2430 }); -
ptoffice-sign-ups/trunk/includes/pto-setting-tab.php
r2792302 r3024997 274 274 * @access public 275 275 **/ 276 public function removeHtmlOrScriptTag($htmlString) { 277 $htmlString = strip_tags($htmlString); 278 // Create a regular expression pattern to match HTML or script tags 279 $pattern = '#<script(.*?)>(.*?)</script>#is'; 280 281 // Use preg_replace to remove the matched HTML or script tag from the string 282 $result = preg_replace($pattern, '', $htmlString); 283 // echo $result; 284 return $result; 285 } 276 286 public function pto_sign_up_delete_user( $user_id ) { 277 287 global $wpdb; … … 709 719 $exporttable .= '<td>'; 710 720 if(!empty( $customfieldval )){ 721 $customfieldval = $this->removeHtmlOrScriptTag($customfieldval); 711 722 $exporttable .= $customfieldval; 712 723 } … … 749 760 $exporttable .= '<td>'; 750 761 if(!empty( $signup_customfieldval )){ 762 $signup_customfieldval = $this->removeHtmlOrScriptTag($signup_customfieldval); 751 763 $exporttable .= $signup_customfieldval; 752 764 } … … 805 817 $exporttable .= '<td>'; 806 818 if(!empty($customfieldval)){ 819 $customfieldval = $this->removeHtmlOrScriptTag($customfieldval); 807 820 $exporttable .= $customfieldval; 808 821 } … … 845 858 $exporttable .= '<td>'; 846 859 if(!empty($signup_customfieldval)){ 860 $signup_customfieldval = $this->removeHtmlOrScriptTag($signup_customfieldval); 847 861 $exporttable .= $signup_customfieldval; 848 862 } … … 902 916 $exporttable .= '<td>'; 903 917 if(!empty($customfieldval)){ 918 $customfieldval = $this->removeHtmlOrScriptTag($customfieldval); 904 919 $exporttable .= $customfieldval; 905 920 } … … 942 957 $exporttable .= '<td>'; 943 958 if(!empty($signup_customfieldval)){ 959 $signup_customfieldval = $this->removeHtmlOrScriptTag($signup_customfieldval); 944 960 $exporttable .= $signup_customfieldval; 945 961 } … … 994 1010 $exporttable .= '<td>'; 995 1011 if(!empty($customfieldval)){ 1012 $customfieldval = $this->removeHtmlOrScriptTag($customfieldval); 996 1013 $exporttable .= $customfieldval; 997 1014 } … … 1034 1051 $exporttable .= '<td>'; 1035 1052 if(!empty($signup_customfieldval)){ 1053 $signup_customfieldval = $this->removeHtmlOrScriptTag($signup_customfieldval); 1036 1054 $exporttable .= $signup_customfieldval; 1037 1055 } -
ptoffice-sign-ups/trunk/includes/pto_manage_volunteer/pto_manage_volunteer.php
r2774823 r3024997 264 264 <?php 265 265 if ( !empty( $customfieldval ) ) { 266 esc_html_e( $customfieldval ); 266 $customfieldval = removeHtmlOrScriptTag($customfieldval); 267 esc_html_e( $customfieldval ); 267 268 } 268 269 else{ … … 303 304 <?php 304 305 if ( !empty( $signup_customfieldval ) ) { 306 $signup_customfieldval = removeHtmlOrScriptTag($signup_customfieldval); 305 307 esc_html_e( $signup_customfieldval ); 306 308 } … … 616 618 <?php 617 619 } 620 function removeHtmlOrScriptTag($htmlString) { 621 $htmlString = strip_tags($htmlString); 622 // Create a regular expression pattern to match HTML or script tags 623 $pattern = '#<script(.*?)>(.*?)</script>#is'; 624 625 // Use preg_replace to remove the matched HTML or script tag from the string 626 $result = preg_replace($pattern, '', $htmlString); 627 // echo $result; 628 return $result; 629 } 618 630 ?> -
ptoffice-sign-ups/trunk/includes/pto_sign_ups_project_tabs/pto_sign_ups_reports.php
r2774823 r3024997 291 291 292 292 if ( !empty( $customfieldval ) ) { 293 esc_html_e( $customfieldval ); 293 $modifiedHtmlString = removeHtmlOrScriptTag($customfieldval); 294 esc_html_e( $modifiedHtmlString ); 294 295 } 295 296 else{ … … 332 333 <?php 333 334 if ( !empty( $signup_customfieldval ) ) { 335 $signup_customfieldval = removeHtmlOrScriptTag($signup_customfieldval); 334 336 esc_html_e( $signup_customfieldval ); 335 337 } … … 616 618 </div> 617 619 </div> 620 <?php 621 function removeHtmlOrScriptTag($htmlString) { 622 $htmlString = strip_tags($htmlString); 623 // Create a regular expression pattern to match HTML or script tags 624 $pattern = '#<script(.*?)>(.*?)</script>#is'; 625 626 // Use preg_replace to remove the matched HTML or script tag from the string 627 $result = preg_replace($pattern, '', $htmlString); 628 // echo $result; 629 return $result; 630 } 631 ?> -
ptoffice-sign-ups/trunk/pto_frontend/assets/js/pto-custom.js
r2792302 r3024997 849 849 }); 850 850 }); 851 852 jQuery( document ).on( 'keypress' , "input" , function(){ 853 // Get the pressed key's character code 854 const charCode = event.charCode || event.keyCode; 855 console.log(charCode); 856 // Define the list of disallowed characters (`,`, `[`, `]`, `{`, `}`) 857 const disallowedChars = [44, 91, 93, 123, 125,92,34,60,62]; 858 859 // Check if the pressed key is in the disallowed list 860 if (disallowedChars.includes(charCode)) { 861 swal({ 862 text: "This character is not allowed. Please try another.", 863 icon: "warning", 864 buttons: true, 865 dangerMode: true, 866 }) 867 event.preventDefault(); // Prevent the character from being entered 868 } 869 }); 870 jQuery( document ).on( 'keypress' , "textarea" , function(){ 871 // Get the pressed key's character code 872 const charCode = event.charCode || event.keyCode; 873 console.log(charCode); 874 // Define the list of disallowed characters (`,`, `[`, `]`, `{`, `}`) 875 const disallowedChars = [44, 91, 93, 123, 125,92,34,60,62]; 876 877 // Check if the pressed key is in the disallowed list 878 if (disallowedChars.includes(charCode)) { 879 swal({ 880 text: "This character is not allowed. Please try another.", 881 icon: "warning", 882 buttons: true, 883 dangerMode: true, 884 }) 885 event.preventDefault(); // Prevent the character from being entered 886 } 887 }); 888 -
ptoffice-sign-ups/trunk/ptoffice.php
r2805509 r3024997 3 3 * Plugin Name: PT Sign Ups - Beautiful volunteer sign ups and management made easy 4 4 * Description: PT Sign Ups makes creating sign ups, organizing group events, and finding volunteers for your school, church, or any organization as simple as ever. An alternative to external sites like SignUp Genius, WP Volunteer Sign Up uses a simple interface to create and manage powerful volunteer sheets all within one powerful plugin. 5 * Version: 1.0. 45 * Version: 1.0.5 6 6 * Author: MJS Software 7 7 * Author URI: https://mjssoftware.com -
ptoffice-sign-ups/trunk/readme.txt
r2805509 r3024997 5 5 Tested up to: 6.0 6 6 Requires PHP: 7.2 7 Stable tag: 1.0. 47 Stable tag: 1.0.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.