Changeset 3147599
- Timestamp:
- 09/06/2024 02:17:57 PM (19 months ago)
- Location:
- rightmessage/trunk
- Files:
-
- 5 edited
-
includes/class-rightmessage.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
-
views/rm-variables.php (modified) (1 diff)
-
views/tracking-code.php (modified) (2 diffs)
-
wp-rightmessage.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rightmessage/trunk/includes/class-rightmessage.php
r2183848 r3147599 1 1 <?php 2 // Prevent direct access to this file 3 if (!defined('ABSPATH')) { 4 exit; 5 } 2 6 3 7 /** … … 39 43 public static function shortcode_area( $attributes, $content = null ) { 40 44 if (isset($attributes['name'])) { 41 return '<div class="rm-area-' .$attributes['name'].'"></div>';45 return '<div class="rm-area-' . esc_attr($attributes['name']) . '"></div>'; 42 46 } 43 47 } … … 45 49 public static function shortcode_trigger( $attributes, $content = null ) { 46 50 if (isset($attributes['widget'])) { 47 return '<a href="#" data-rm-show="' .$attributes['widget'].'">'.$content.'</a>';51 return '<a href="#" data-rm-show="' . esc_attr($attributes['widget']) . '">' . esc_html($content) . '</a>'; 48 52 } 49 53 } … … 55 59 $area_id = self::_get_settings( 'default_area' ); 56 60 if (isset($area_id)) { 57 $content .= "[rm_area name='" .$area_id."']";61 $content .= "[rm_area name='" . esc_attr($area_id) . "']"; 58 62 } 59 63 … … 92 96 if (isset($rmpanda_cmsdata)) { 93 97 ob_start(); 94 include( RIGHTMESSAGE_PLUGIN_PATH . "/views/rm-variables.php" ); 95 $content .= ob_get_clean(); 98 include(RIGHTMESSAGE_PLUGIN_PATH . "/views/rm-variables.php"); 99 $included_content = ob_get_clean(); 100 $content .= wp_kses_post($included_content); 96 101 } 97 102 … … 101 106 public static function rm_tracking_code($obj) { 102 107 if ( self::_get_settings( 'account_id' ) ) { 103 $account_id = self::_get_settings( 'account_id');108 $account_id = esc_js(self::_get_settings( 'account_id' )); 104 109 include( RIGHTMESSAGE_PLUGIN_PATH . "/views/tracking-code.php" ); 105 110 } else { -
rightmessage/trunk/readme.txt
r3147533 r3147599 4 4 Requires at least: 3.6 5 5 Tested up to: 6.6.1 6 Stable tag: trunk6 Stable tag: 0.9.6 7 7 Requires PHP: 5.2.0 8 8 License: GPL2 … … 22 22 * automatically appending a personalized opt-in form at the bottom of all your blog posts, if you want 23 23 24 == Privacy == 25 This plugin relies on the third-party service RightMessage to integrate personalized calls-to-action into your website. Data is sent to RightMessage when the plugin is activated and configured. For more information, please review [RightMessage's Privacy Policy](https://rightmessage.com/privacy) and [Terms of Service](https://rightmessage.com/terms). 26 27 == Changelog == 28 29 = 0.9.6 = 30 * Fixed: Issue with incorrect stable tag. 31 * Updated: All variables are now properly escaped before being echoed. 32 * Added: Documentation for third-party service usage (RightMessage). 33 * Improved: Security by preventing direct file access. 34 24 35 == Frequently Asked Questions == 25 36 -
rightmessage/trunk/views/rm-variables.php
r2128728 r3147599 1 <?php 2 // Prevent direct access to this file 3 if (!defined('ABSPATH')) { 4 exit; 5 } 6 ?> 1 7 <!-- RightMessage WP --> 2 8 <script type="text/javascript"> 3 9 <?php if(isset($rmpanda_cmsdata)) { ?> 4 10 window.rmpanda = window.rmpanda || {}; 5 window.rmpanda.cmsdata = <?php echo json_encode($rmpanda_cmsdata)?>;11 window.rmpanda.cmsdata = <?php echo wp_json_encode($rmpanda_cmsdata); ?>; 6 12 <?php } ?> 7 13 </script> -
rightmessage/trunk/views/tracking-code.php
r3147435 r3147599 1 <?php 2 // Prevent direct access to this file 3 if (!defined('ABSPATH')) { 4 exit; 5 } 6 ?> 1 7 <!-- RightMessage WP embed --> 2 8 <script type="text/javascript"> … … 8 14 b.parentNode.insertBefore(o, b); return o; }; o = d('', '-hidden', ''); d('-stay-invisible', '-stay-hidden', '-stay'); 9 15 setTimeout(function() { o.parentNode && o.parentNode.removeChild(o); }, a); 10 })('<?php echo $account_id?>', 20000, document);16 })('<?php echo esc_js($account_id); ?>', 20000, document); 11 17 </script> -
rightmessage/trunk/wp-rightmessage.php
r3147533 r3147599 1 1 <?php 2 // Prevent direct access to this file 3 if (!defined('ABSPATH')) { 4 exit; 5 } 2 6 /** 3 7 * Plugin Name: RightMessage Wordpress Plugin … … 10 14 * Text Domain: rightmessage 11 15 */ 16 17 18 12 19 13 20 if ( class_exists( 'WP_RightMessage' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.