HI -
Using s2member pro v170524 and I notice that calling do_encode is producing extra < p > and < /p> 's in the HTML. This is causing the JW Player to fail. Is anyone else seeing this? Just want to check before opening a bug report.
Here is the WordPress code:
Call do_shortcode results in extra para tags
<?php $partial_path = '2017/BiTS2017s7p1Koh';
echo do_shortcode('[s2Stream player="jwplayer-v7" player_path="/jwplayer-v7/jwplayer.js"' .
'ssl="on" ' .
'player_key="jJ52DEiM6baR7IxS7eKJow0WpGqjCD3oVUBfuw==" ' .
'player_image="/premium/wp-content/uploads/' . $partial_path . '.png" ' .
'file_download="access-s2member-level2/' . $partial_path . '.mp4" /]');
?>
Here is the resulting HTML - note the extra < p > and < /p > in the output:
<div class="entry-content">
<p>Call do_shortcode results in extra para tags</p>
<div id="s2-stream-a70b7e624879affef0f7731e343a3a64" class="s2member-jwplayer-v7"></div>
<p><script type="text/javascript" src="/jwplayer/jwplayer.js"></script><br />
<script type="text/javascript">
if(typeof jwplayer.key !== 'string' || !jwplayer.key)
jwplayer.key = 'jJ52DEiM6baR7IxS7eKJow0WpGqjCD3oVUBfuw==';</p>
<p> jwplayer('s2-stream-a70b7e624879affef0f7731e343a3a64').setup
({
playlist:
[{
title: '',
image: '/premium/wp-content/uploads/2017/BiTS2017s7p1Koh.png',</p>
<p> mediaid: '',
description: '',</p>
<p> tracks: [],</p>
<p> sources: [{'file': 'https://d234ebimhxzr96.cloudfront.net/access-s2member-level2/2017/BiTS2017s7p1Koh.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kMjM0ZWJpbWh4enI5Ni5jbG91ZGZyb250Lm5ldC9hY2Nlc3MtczJtZW1iZXItbGV2ZWwyLzIwMTcvQmlUUzIwMTdzN3AxS29oLm1wNCIsIkNvbmRpdGlvbiI6eyJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiNjkuMTY3LjM0LjU2LzMyIn0sIkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNDk4MjU3MTA0fX19XX0_&Signature=kEsmOeOE6TT9g6CBaeQS2lz6uK9KaPb6eOlSR9qcui-T-hz8iPo2N1E-J~iwtHrgqVkKHivK2LSxpzm8T2o9Q3DoBbKw990dgpT9Xc7XFRdZrL-y9lp~KJu1fxefWH08sJP8qUJbCtcHYNb0jZLVp0v2fjdAS7caorjIUdWMsF4_&Key-Pair-Id=APKAIWLVFIBJE4VLZZJQ','default': 'true'}]
}],</p>
<p> controls: true,
stretching: 'uniform',
width: 480,
height: 270,
aspectratio: '',</p>
<p> mute: false,
autostart: false,
fallback: true,
primary: 'flash',
repeat: false,</p>
<p> });
</script></p>
</div><!-- .entry-content -->
Thanks,
Ira