PowerPress Podcasting plugin by Blubrry - Version 9.1.4

Version Description

  • Released on 08/03/2022
  • Encode html special characters in media URLs
  • Allow more characters for certain Blubrry media URLs
Download this release

Release Info

Developer benbeecroft
Plugin Icon 128x128 PowerPress Podcasting plugin by Blubrry
Version 9.1.4
Comparing to
See all releases

Code changes from version 9.1.3 to 9.1.4

Files changed (3) hide show
  1. powerpress.php +20 -3
  2. powerpressadmin.php +18 -5
  3. readme.txt +11 -6
powerpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="https://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
- Version: 9.1.3
7
  Author: Blubrry
8
  Author URI: https://blubrry.com/
9
  Requires at least: 3.6
@@ -35,7 +35,7 @@ if( !function_exists('add_action') ) {
35
  }
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
- define('POWERPRESS_VERSION', '9.1.3' );
39
 
40
  // Translation support:
41
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -968,8 +968,18 @@ function powerpress_rss2_item()
968
  if( empty($EpisodeData['size']) )
969
  $EpisodeData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
970
 
 
 
 
 
 
 
 
 
 
 
971
  echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
972
- powerpress_url_in_feed(trim($EpisodeData['url'])),
973
  trim($EpisodeData['size']),
974
  trim($EpisodeData['type']),
975
  PHP_EOL);
@@ -1209,6 +1219,13 @@ function powerpress_filter_rss_enclosure($content)
1209
  $content = str_replace("length=\"{$matches[1]}\"", "length=\"5242880\"", $content);
1210
  }
1211
 
 
 
 
 
 
 
 
1212
  // Replace the original url with the modified one...
1213
  if( $OrigURL != $ModifiedURL )
1214
  return str_replace($OrigURL, $ModifiedURL, $content);
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://create.blubrry.com/resources/powerpress/
5
  Description: <a href="https://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
6
+ Version: 9.1.4
7
  Author: Blubrry
8
  Author URI: https://blubrry.com/
9
  Requires at least: 3.6
35
  }
36
 
37
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
38
+ define('POWERPRESS_VERSION', '9.1.4' );
39
 
40
  // Translation support:
41
  if ( !defined('POWERPRESS_ABSPATH') )
968
  if( empty($EpisodeData['size']) )
969
  $EpisodeData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
970
 
971
+ // encode htmlspecialchars if necessary
972
+ $decoded = htmlspecialchars_decode($EpisodeData['url']);
973
+ if (strlen($decoded) != strlen($EpisodeData['url'])) {
974
+ // already encoded
975
+ $media_url = $EpisodeData['url'];
976
+ } else {
977
+ // might need encoded/no risk of double encoding
978
+ $media_url = htmlspecialchars($EpisodeData['url']);
979
+ }
980
+
981
  echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
982
+ powerpress_url_in_feed(trim($media_url)),
983
  trim($EpisodeData['size']),
984
  trim($EpisodeData['type']),
985
  PHP_EOL);
1219
  $content = str_replace("length=\"{$matches[1]}\"", "length=\"5242880\"", $content);
1220
  }
1221
 
1222
+ // encode htmlspecialchars if necessary
1223
+ $decoded = htmlspecialchars_decode($ModifiedURL);
1224
+ if (strlen($decoded) == strlen($EpisodeData['url'])) {
1225
+ // might need encoded/no risk of double encoding
1226
+ $ModifiedURL = htmlspecialchars($ModifiedURL);
1227
+ }
1228
+
1229
  // Replace the original url with the modified one...
1230
  if( $OrigURL != $ModifiedURL )
1231
  return str_replace($OrigURL, $ModifiedURL, $content);
powerpressadmin.php CHANGED
@@ -1931,10 +1931,18 @@ function powerpress_edit_post($post_ID, $post)
1931
 
1932
  if( isset($Powerpress['episode_title']) && trim($Powerpress['episode_title']) != '' )
1933
  $ToSerialize['episode_title'] = stripslashes($Powerpress['episode_title']);
1934
- if( isset($Powerpress['episode_no']) && trim($Powerpress['episode_no']) != '' )
1935
- $ToSerialize['episode_no'] = stripslashes(floor($Powerpress['episode_no']));
1936
- if( isset($Powerpress['season']) && trim($Powerpress['season']) != '' )
1937
- $ToSerialize['season'] = stripslashes($Powerpress['season']);
 
 
 
 
 
 
 
 
1938
  if( isset($Powerpress['episode_type']) && trim($Powerpress['episode_type']) != '' )
1939
  $ToSerialize['episode_type'] = stripslashes($Powerpress['episode_type']);
1940
 
@@ -2492,8 +2500,13 @@ function powerpress_check_url(url, DestDiv)
2492
  Div.removeClass("updated");
2493
  // allow query strings from trusted hosts
2494
  var validChars = ':0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/-_.:';
2495
- if (url.includes('traffic.libsyn.com') || url.includes('cdn.simplecast.com') || url.includes('buzzsprout.com') || url.includes('audioboom.com') || url.includes('mc.blubrry.com')) {
2496
  validChars = ':0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/-_.?=&:';
 
 
 
 
 
2497
  }
2498
  let FeedSlug = DestDiv.replace("powerpress_warning_", "");
2499
 
1931
 
1932
  if( isset($Powerpress['episode_title']) && trim($Powerpress['episode_title']) != '' )
1933
  $ToSerialize['episode_title'] = stripslashes($Powerpress['episode_title']);
1934
+ if( isset($Powerpress['episode_no']) && trim($Powerpress['episode_no']) != '' ) {
1935
+ if (intval($Powerpress['episode_no']) < 0) {
1936
+ $Powerpress['episode_no'] = -1 * intval($Powerpress['episode_no']);
1937
+ }
1938
+ $ToSerialize['episode_no'] = stripslashes(floor($Powerpress['episode_no']));
1939
+ }
1940
+ if( isset($Powerpress['season']) && trim($Powerpress['season']) != '' ) {
1941
+ if (intval($Powerpress['season']) < 0) {
1942
+ $Powerpress['season'] = -1 * intval($Powerpress['season']);
1943
+ }
1944
+ $ToSerialize['season'] = stripslashes($Powerpress['season']);
1945
+ }
1946
  if( isset($Powerpress['episode_type']) && trim($Powerpress['episode_type']) != '' )
1947
  $ToSerialize['episode_type'] = stripslashes($Powerpress['episode_type']);
1948
 
2500
  Div.removeClass("updated");
2501
  // allow query strings from trusted hosts
2502
  var validChars = ':0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/-_.:';
2503
+ if (url.includes('traffic.libsyn.com') || url.includes('cdn.simplecast.com') || url.includes('buzzsprout.com') || url.includes('audioboom.com')) {
2504
  validChars = ':0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/-_.?=&:';
2505
+
2506
+ }
2507
+ // for blubrry's programmatic ads, we include %s to encode the feed url in the query string
2508
+ if (url.includes('mc.blubrry.com')) {
2509
+ validChars = ':0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/-_.?=&%:';
2510
  }
2511
  let FeedSlug = DestDiv.replace("powerpress_warning_", "");
2512
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts,
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 6.0
7
- Stable tag: 9.1.3
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
@@ -19,12 +19,12 @@ No. 1 Podcasting plugin for WordPress.
19
  PowerPress Podcasting Plugin is to Publish and manage your podcast directly from your WordPress website, building your brand on your website. Developed by podcasters for podcasters (Blubrry Podcasting), the PowerPress podcast plugin works with all podcasting apps and platforms, including Apple Podcasts, Google Podcasts, Spotify, Amazon Music, Etc. Best of all, it integrates with Blubrry’s podcast hosting and statistics, providing convenient features such as easy upload directly within your dashboard. The plugin works with any podcast host.
20
 
21
  = PowerPress Key Features =
22
- - Integrated Players: PowerPress includes audio and video players with embed support from sites like YouTube.
23
  - NEW: [Skip to Position in Player](https://blubrry.com/support/powerpress-documentation/skip-to-position-in-player/) shortcode allows you to jump to a given time stamp from the episode, right in your player.
24
- - Subscribe tools: Create subscribe page with our exclusive subscribe shortcode embed and subscribe sidebar widget optimized for responsive websites, high-resolution screens and Apple Retina displays.
25
- - Podcast Importing and Migration: Moving from another podcast host or publishing platform? You can import your podcast from SoundCloud, Libsyn, PodBean, Squarespace, Anchor, or any valid podcast RSS feed without losing episodes. Our Import Podcast tool paired with our Migrate Media tool can move your media to Blubrry Hosting without skipping a beat.
26
- - Multiple Podcast Feeds on One Website: Create separate podcasts by category or media format using our Category Podcasting or Podcast Channels features.
27
- - Languages: PowerPress has been translated to many languages, and enable emoji use for your podcast feed.
28
 
29
  = Get Started =
30
  Feel at ease with our Get Started setup guide. We’ll take you through settings and options best suited for your podcast.
@@ -186,6 +186,11 @@ If you are a fan of PowerPress, we would greatly appreciate it if you could take
186
 
187
  == Changelog ==
188
 
 
 
 
 
 
189
  = 9.1.3 =
190
  * Released on 07/27/2022
191
  * Updated wording for 'Stats Prefix'
4
  Requires at least: 3.6
5
  Requires PHP: 5.2
6
  Tested up to: 6.0
7
+ Stable tag: 9.1.4
8
  Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
9
  License: GPLv2 or later
10
 
19
  PowerPress Podcasting Plugin is to Publish and manage your podcast directly from your WordPress website, building your brand on your website. Developed by podcasters for podcasters (Blubrry Podcasting), the PowerPress podcast plugin works with all podcasting apps and platforms, including Apple Podcasts, Google Podcasts, Spotify, Amazon Music, Etc. Best of all, it integrates with Blubrry’s podcast hosting and statistics, providing convenient features such as easy upload directly within your dashboard. The plugin works with any podcast host.
20
 
21
  = PowerPress Key Features =
22
+ - Integrated Players: PowerPress includes audio and video players with embedded support from sites like YouTube.
23
  - NEW: [Skip to Position in Player](https://blubrry.com/support/powerpress-documentation/skip-to-position-in-player/) shortcode allows you to jump to a given time stamp from the episode, right in your player.
24
+ - Podcast Import and Migration: Moving from another podcast host or publishing platform? You can import your Podcast from Anchor, SoundCloud, Libsyn, PodBean, Buzzsprout, Squarespace, or any valid podcast RSS feed without losing episodes. Our Import Podcast tool, paired with our Migrate Media tool, can move your media to Blubrry Hosting without skipping a beat.
25
+ - Subscribe tools: Create a subscribe page with our subscribe shortcode embed and subscribe sidebar widget optimized for responsive websites, high-resolution screens, and Apple Retina displays.
26
+ - Multiple Podcast & Feeds on one website: Create separate podcasts by category or media format using our Category Podcasting or Podcast Channels features.
27
+ - Languages: PowerPress has been translated into many languages and enables emoji use for your podcast feed.
28
 
29
  = Get Started =
30
  Feel at ease with our Get Started setup guide. We’ll take you through settings and options best suited for your podcast.
186
 
187
  == Changelog ==
188
 
189
+ = 9.1.4 =
190
+ * Released on 08/03/2022
191
+ * Encode html special characters in media URLs
192
+ * Allow more characters for certain Blubrry media URLs
193
+
194
  = 9.1.3 =
195
  * Released on 07/27/2022
196
  * Updated wording for 'Stats Prefix'