Changeset 3209430
- Timestamp:
- 12/17/2024 06:43:48 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pcrecruiter-extensions/trunk/PCRecruiter-Extensions.php
r3209389 r3209430 19 19 } 20 20 add_action( 'wp_enqueue_scripts', 'pcr_assets' ); 21 function sanitize_loadurl($urlparam) 22 { 23 // Allow only letters, numbers, periods, equals, colons, question marks, forward slashes, percent signs, and spaces 24 return preg_replace('/[^a-zA-Z0-9\.\=\:\?\/%\s]/', '', $urlparam); 25 26 } 21 27 function pcr_frame($atts) 22 28 { … … 30 36 $sid = intval($a['form']); 31 37 $loadurl = $a['link']; 32 function sanitize_loadurl($urlparam)33 {34 // Allow only letters, numbers, periods, equals, colons, question marks, forward slashes, percent signs, and spaces35 return preg_replace('/[^a-zA-Z0-9\.\=\:\?\/%\s]/', '', $urlparam);36 37 }38 38 $loadurl = sanitize_loadurl($loadurl); 39 39 $initialheight = intval($a['initialheight']); … … 84 84 $doc->appendChild($iframe); 85 85 86 return "<!-- Start PCRecruiter WP 1.4.2 -->"86 return "<!-- Start PCRecruiter WP 1.4.21-->" 87 87 . $pcrframecss 88 88 . $doc->saveHTML() … … 462 462 public function print_section_info() 463 463 { 464 echo '<p>When enabled, this feature will duplicate PCRecruiter\'s dynamic RSS feed as a static file at <a target="_blank" href="'. site_url() .'/wp-content/uploads/pcrjobfeed.xml">'. site_url() .'/wp-content/uploads/pcrjobfeed.xml</a>. You may use this data as a source for plugins and other third-party feed utilities.</p><p><strong>The settings in this panel are NOT required for standard PCRecruiter Job Board embedding functions.</strong> Checking the "Job Feed Enabled" box below without proper values in the rest of this form may introduce errors into your website. Please <a target="_blank" href="https://help.pcrecruiter.com">contact PCRecruiter Support</a> for guidance if you wish to enable this feature.</p>'; 465 464 echo '<p>When enabled, this feature will duplicate PCRecruiter\'s dynamic RSS feed as a static file at <a target="_blank" href="'. esc_url( site_url() ) .'/wp-content/uploads/pcrjobfeed.xml">'. esc_url( site_url() ) .'/wp-content/uploads/pcrjobfeed.xml</a>. You may use this data as a source for plugins and other third-party feed utilities.</p>'; 466 465 // Check to see if "Store Local Feed" is active. If it is, show the manual save button 467 466 if($this->options['activation'] ?? false){ … … 470 469 if (file_exists($fname)) { 471 470 $d = date ("F d Y H:i:s", filectime($fname)); 472 echo "<em style=\"font-weight:bold\">" . $filename . " last updated: " . $d. " (UTC).</em>";471 echo "<em style=\"font-weight:bold\">" . esc_html( $filename ) . " last updated: " . esc_html( $d ) . " (UTC).</em>"; 473 472 } else { 474 echo "<i>File " . $fname. " doesn't exist...</i>";473 echo "<i>File " . esc_html( $fname ) . " doesn't exist...</i>"; 475 474 } 476 475 } … … 496 495 echo "<select id='frequency' name='pcr_feed_options[frequency]'>"; 497 496 foreach($items as $item) { 498 $selected = ($this->options['frequency'] ==$item) ? 'selected="selected"' : '';499 echo "<option value=' $item' $selected>$item</option>";497 $selected = ($this->options['frequency'] == $item) ? 'selected="selected"' : ''; 498 echo "<option value='" . esc_attr( $item ) . "' " . esc_attr( $selected ) . ">" . esc_html( $item ) . "</option>"; 500 499 } 501 500 echo "</select>"; … … 522 521 523 522 printf( 524 '<input type="text" id="custom_fields" name="pcr_feed_options[custom_fields]" value="%s" size="60" /><br /><span style="font-size:.8em;">Comma separated. </span>',523 '<input type="text" id="custom_fields" name="pcr_feed_options[custom_fields]" value="%s" size="60" /><br /><span style="font-size:.8em;">Comma separated. Be sure to replace any %%20 characters with spaces.</span>', 525 524 isset( $this->options['custom_fields'] ) ? esc_attr( $this->options['custom_fields']) : '' 526 525 ); … … 547 546 $check2 = ""; 548 547 } 549 printf('<input type="radio" id="job" name="pcr_feed_options[mode]" value="job" %s /> Job Link<br />', $check1); 550 printf('<input type="radio" id="apply" name="pcr_feed_options[mode]" value="apply" %s /> Apply Link<br />', $check2); 548 printf('<input type="radio" id="%s" name="pcr_feed_options[mode]" value="job" %s /> %s<br />', 549 esc_attr('job'), 550 esc_attr($check1), 551 esc_html('Job Link') 552 ); 553 printf('<input type="radio" id="%s" name="pcr_feed_options[mode]" value="apply" %s /> %s<br />', 554 esc_attr('apply'), 555 esc_attr($check2), 556 esc_html('Apply Link') 557 ); 551 558 } 552 559 }
Note: See TracChangeset
for help on using the changeset viewer.