Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

encodeURIComponent stop working in 4.6

2 replies [Last post]

So far I have used this js function with 4.4:

function newPly(nP,nF,iG) {
document.getElementById(nP).sendEvent('STOP');
document.getElementById(nP).sendEvent('LOAD',{file:encodeURIComponent(nF),type:'video',image:encodeURIComponent(iG)});
document.getElementById(nP).sendEvent('PLAY','true');
};

With 4.5 and 4.6 i need eliminate the encodeURIComponent(). It seems they prefer raw URIs, no matter if they are full of ?,=,&. My new function is:

function newPly(nP,nF,iG) {
document.getElementById(nP).sendEvent('STOP');
document.getElementById(nP).sendEvent('LOAD',{file:nF,type:'video',image:iG});
document.getElementById(nP).sendEvent('PLAY','true');
};

It´s a bug or a enhancement??

I call this function from a link:

<a href="javascript:newPly('<?php echo $row['idvideo']?>','<?php echo html_entity_decode($row['urlvid'])?>','<?php echo $row['urlimg']?>')">Clik here for another video</a>

I need the html_entity_decode() php function because i need to save all my URIs with the htmlentities() function.

Sorry, I'm not clear on what the problem is. Can you please restate your issue?