Needs review
Project:
jPlayer
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jan 2013 at 00:27 UTC
Updated:
22 Jul 2014 at 19:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sondes commentedHere's a screenshot to clarify.
Comment #2
sondes commentedI ended up going with a really simple solution to render HTML characters properly.
On line 116 of jplayer_style_plugin.inc I added:
$label = htmlspecialchars_decode($label, ENT_QUOTES);The playlist seems to be working just as it was. Is this something that someone could add to .dev?
Comment #3
dawehnerThe problem here is that views already escapes it's values, so the additional check plain might causes problems.
One possible solution could be to let code which provides the label take care about the escaping, so maybe let jplayer_sort_files() escape all
item labels unless the ones coming from an external source and then drop the check_plain() out of the template?
Comment #4
ghosts commentedThis is not the most elegant way to fix it, but in the file
jplayer_style_plugin.incI added the following at line 120:It works. Of course, only for apostrophes (which is all I wanted) but you could tinker with it.
Since I didn't include a patch, here is the surrounding code so that you can navigate yourself:
Comment #5
xamanu commentedHere is a patch. I just decode htmlspecialchars in the jplayer_sort_files() function, works for me and should be fine.
Comment #6
jerry commentedThe patch above is working for me, though I needed to specify ENT_QUOTES rather than the default ENT_COMPAT to htmlspecialchars_decode().