google-code-export / slideshow

Automatically exported from code.google.com/p/slideshow
0 stars 1 forks source link

slideshow doesn´t work, if you use an apostroph in subtitles #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you use an apostroph in the picture subtitle, after this moment slideshow 
doesn't starts. Slideshow loads the first picture of the show  only.

What version of the product are you using? On what operating system and
browser?

I use slideshow with contao cms. Windows XP, Firefox 3.6 

Original issue reported on code.google.com by mickiem...@googlemail.com on 4 Nov 2010 at 4:54

GoogleCodeExporter commented 9 years ago
So there are technical differences between an apostrophe (’) and  a 
single-quote ('). Slideshow / Javascript has no problem with apostrophes - 
though you'll need to use their unicode value. You write unicode with backslash 
(\) + u + unicode value. The unicode value of apostrophe is 2019. So in your 
subtitle do:

'Apostrophe\u2019s are cool!'

Here is a table with unicode values:

http://www.utf8-chartable.de/

If you really mean a single-quote not an apostrophe, then you can do 1 of 2 
things. If you are using single-quotes to wrap your subtitle, switch to 
double-quotes:

'the single-quote in this subtitle will break javascript because it thinks 
you've ended the string'

to:

"but if you switch to double-quote it won't have any problem"

Or escape the single-quote with a backslash:

'this also won\'t be a problem'

Original comment by aeron.gl...@gmail.com on 4 Nov 2010 at 12:20