This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Pages: 1 - Last Post: 10-Dec-2019 08:04 Last Post By: Laza Threads: [ Previous | Next ]
Lobata

Posts: 4
Registered: 30-Nov-2016
Single quote in music background filename results in no browser music
Posted: 08-Dec-2019 10:12
 
  Click to reply to this thread Reply
Very minor problem:
On Windows 7, using jAlbum 19.1 and 19.2, using the Tiger skin version 2.9.5, I selected a song from one of my rip'ed CDs that had an apostrophe in the file name. The *.mp3 played fine in VLC and Windows Player. But when it came to playing the project preview, the computer was silent. The same for playing it in Chrome and Firefox. In the Tiger "Background music" tab, the mp3 file plays fine.

Looking at the generated index.html, a snippet shows that the apostrophe, or single quote, should be escaped:

data-audioplayer='{"src":["pharrell_williams_happy.mp3","You've_got_a_Friend.mp3","stand_by_me_ben_e_king.mp3"],"folder":"res"}'


The single quote in "you've" should be replaced with & # 3 9 ; (taking out the spaces) or something similar.

When I switched to the Turtle skin, I saw that the mp3 filename in the generated index.html had the single quote escaped, and the music played properly in Firefox.

Edited by: Lobata on 08-Dec-2019 10:23
Laza

Posts: 2,301
Registered: 6-Sep-2005
Re: Single quote in music background filename results in no browser music
Posted: 08-Dec-2019 10:45   in response to: Lobata in response to: Lobata
 
  Click to reply to this thread Reply
It's better to rename those files before added - sometimes it's impossible to escape all those single and double quotes which are used as string deliminators in every programming language.
Lobata

Posts: 4
Registered: 30-Nov-2016
Re: Single quote in music background filename results in no browser music
Posted: 10-Dec-2019 07:45   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
I agree. The workaround of renaming the file was easy. I only mentioned it because the predecessor Turtle skin had the single quote escaped, and escaping the same in the new Tiger skin was apparently overlooked. I imagine the fix would be easy, and it may solve similar problems dealing with filenames not yet reported (like a photo filename containing a single quote).
Laza

Posts: 2,301
Registered: 6-Sep-2005
Re: Single quote in music background filename results in no browser music
Posted: 10-Dec-2019 08:04   in response to: Lobata in response to: Lobata
 
  Click to reply to this thread Reply
In theory the apostrophes in Tiger are escaped too, but Tiger is using a completely different approach, using the browser's own AUDIO player instead of the custom designed player in Turtle, which I had full control over. With the browser's own component I can't guarantee the apostrophes will work in the mp3 file name.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums