Special character treatment with Create Web Page
Posted: Thu Dec 03, 2009 5:35 pm
This problem is related to the "Create" - "Web Page" function: using "Show information" and specifying IPTC or EXIF fields which contain national or special characters.
National characters from the "Show information" field (like the German Umlauts) are translated to Unicode characters in the generated HTML code. That's O.K. Unfortunately it does not translate special characters like " & < > to Unicode or " & < >
This leads to a clobbered webpage display when the "information field" contains any such character, and happens to be included in a place in the HTML code where such a character confuses the parsing of the HTML code by the browser.
Example: in the web template thumb.html a line like this:
<a href="#FRAME_PAGE#" target="frame2" title="#THUMB_TEXT#"><img src="#THUMB_LINK#" alt="#FILENAME#"></a>
and #THUMB_TEXT# containing something like this:
Mercedes-Benz "Knight", Bj 1919
results in html code like this:
<a href="original/IMG4130.html" target="frame2" title="Mercedes-Benz "Knight", Bj 1919"><img src="thumb/t_IMG4130.jpg" alt="IMG4130.jpg" ></a>
It is obvious that the extra quotes inserted by #THUMB_TEXT# will cause trouble.
I suggest to translate these 4 special characters to Unicode as it is done for national characters.
Regards, Klapperstorch
National characters from the "Show information" field (like the German Umlauts) are translated to Unicode characters in the generated HTML code. That's O.K. Unfortunately it does not translate special characters like " & < > to Unicode or " & < >
This leads to a clobbered webpage display when the "information field" contains any such character, and happens to be included in a place in the HTML code where such a character confuses the parsing of the HTML code by the browser.
Example: in the web template thumb.html a line like this:
<a href="#FRAME_PAGE#" target="frame2" title="#THUMB_TEXT#"><img src="#THUMB_LINK#" alt="#FILENAME#"></a>
and #THUMB_TEXT# containing something like this:
Mercedes-Benz "Knight", Bj 1919
results in html code like this:
<a href="original/IMG4130.html" target="frame2" title="Mercedes-Benz "Knight", Bj 1919"><img src="thumb/t_IMG4130.jpg" alt="IMG4130.jpg" ></a>
It is obvious that the extra quotes inserted by #THUMB_TEXT# will cause trouble.
I suggest to translate these 4 special characters to Unicode as it is done for national characters.
Regards, Klapperstorch