Topic: Use of special characters

I am aware that this topic has been discussed on the forum, however I still do not know hot to solved it.
I recently moved my hosting provider which uses Linux. I found out the hard way, that Linux is very restrictive regarding the use of special characters.
While writing captions for the galleries, I often use apostrophe, like in this sentence: The cathedral's four rectilinear stained glass windows.
I notice in the config.xml that whenever the apostrophe is inserted the captions caption text after - and all the way to the end - turns green. When that happens the gallery is not displayed at all.  If I correct it (removing the apostrophe), the gallery is displayed. BTW the same happens when using quotation marks.
Is there any way to solve this?
Thank you
Ed

Re: Use of special characters

Using an apostrophe in an image title or caption should not cause any problems (on a Linux or Windows server) so there might be a problem elsewhere in your 'config.xml' file (like something begin enclosed in single quotes which your apostrophe is closing off).
Try opening your 'config.xml' file directly in your browser and, if there is a problem with the syntax of the XML file,  then your browser should hopefully tell you what the problem is and at which line in the file the problem occurs.

It is always a good idea to enclose image title and caption text inside <![CDATA[ ... ]]> tags (essential when using HTML code within an image title or caption) but this should not be necessary for just an apostrophe.

For example:

<title>The cathedral's four rectilinear stained glass windows.</title>

... should cause no problems (either with the syntax of the XML file or with the display of the gallery). With <![CDATA[ ... ]]> tags, it would look like this:

<title><![CDATA[The cathedral's four rectilinear stained glass windows.]]></title>

(If you enter the image title or caption within JuiceboxBuilder-Pro's interface, then <![CDATA[ ... ]]> tags will automatically be used.)

I hope this helps.
However, if you continue to experience difficulties, please provide your gallery's 'config.xml' file (attach it to a post or post a link to it) and I'll take a look and hopefully figure out exactly what the problem is. Thank you.

Re: Use of special characters

Steven
Thanks for your comments and instructions. Needless to say that when I try to make my point, the problem is not replicated. I could open the config.xml in the browser without problem and the gallery also opened despite me inserting all previously removed apostrophes and quotation marks - the caption text are always inserted using the Juicebox interface.
I am still intrigued by the fact that the config.xml font color changes to green as soon as an apostrophe - or quotation mark - is found anywhere in the caption text. I am attaching the xml file for you to have a look - particlarly on line 53. The next caption text and all following are green. If I delete the closing quotation all the caption text turn back to blue.
Thanks for your patience.
Ed

Re: Use of special characters

I am still intrigued by the fact that the config.xml font color changes to green as soon as an apostrophe - or quotation mark - is found anywhere in the caption text.

I don't know what program you are using to inspect your gallery's 'config.xml' file (maybe a browser or a text editor) but it could be that the syntax highlighting looks incorrect because the language (in whatever program you are using) is not set to 'XML'.
Please let me know what program you see the green text in (and double-check that its language/syntax highlighting is set to 'XML').
If the browser reports no errors when you open the 'config.xml' file directly and the gallery displays fine, then it is unlikely that there is a problem with the file and the issue is likely to be an incorrect language/syntax highlighting setting in whatever program you see the green text in.
By all means attach your 'config.xml' file to a post (or provide a link to it) and I'll take a look at it for you.

Re: Use of special characters

I use Dreamweaver CC to view and read the xml file and to compile the finished page. I would not know where to look for the language and how to set it to XML if needed. I thought I did attach the xml file with my previous message, so let me try again.
Thanks for all.
Ed

Post's attachments

config.xml 128.23 kb, 1 downloads since 2018-08-16 

You don't have the permssions to download the attachments of this post.

Re: Use of special characters

Steven
I just now realized that unless you use DW you will not see what described earlier.
I did a print screen and copied to a word doc - hopefully here as attachment.
Thanks
Ed

Post's attachments

config_xml.docx 1.11 mb, 1 downloads since 2018-08-16 

You don't have the permssions to download the attachments of this post.

Re: Use of special characters

Skip straight to the edit below if you like.
I include my original post for the sake of completeness.

Original post:
Thank you for providing the additional information and files.
Bottom line is that it looks like it might be a syntax highlighting problem with Dreamweaver.

The apostrophe and double quote are both used to open and close quotations, e.g. 'hello or "hello".
In an XML file they are both XML entities and, if they are not enclosed within CDATA tags, they should be escaped (as &apos; and &quot; respectively). Please see here for details.

If you use a single ' or ", then a syntax highlighting program might think that it is the start of a quotation and look for a matching closing ' or " (and highlight everything in between).

However, your ' and " characters are enclosed within CDATA tags (which JuiceboxBuilder-Pro automatically generates) so they do not need to be escaped.
Moreover, the entry that you refer to (turning all text green) includes two " characters (which open and close the quotation) so the program should not be looking for a third " character before turning the green highlighting off.

Check the lower-right corner of your Dreamweaver window and you should find a language selector (as seen in the second screenshot in this Adobe forum post). Make sure that it is set to XML (and not something else such as HTML). This might help. Otherwise, it looks like it might be a syntax highlighting problem with Dreamweaver.

Edit:
I've just found this Adobe forum thread (entitled "XML code coloring incorrectly parses in CDATA areas") which seems to confirm that it is a Dreamweaver problem ("Dreamweaver's code coloring doesn't recognize CDATA sections.") dating back to 2009 so I'd recommend using a different program to validate your XML code.

Re: Use of special characters

Steven

I really appreciate all your help on this. As mentioned  on my first post, it all started with the gallery not being displayed. Viewing
the config.xml I noted the different font color etc. It was then the only visual clue - however and obviously it was something else.
Since then all galleries display OK in the browser. And  - as you pointed out after researching the Adobe Forum (thanks for that) - it is a DW problem. I can live with that.
Again, thank your very very much.
Ed

Re: Use of special characters

No problem!
If you ever have a problem with a Juicebox gallery not displaying again, just post back and I'll do my best to help you out.