Special character treatment with Create Web Page

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, xnview

Post Reply
User avatar
klapperstorch
Posts: 49
Joined: Fri Jan 26, 2007 8:43 am

Special character treatment with Create Web Page

Post by klapperstorch » 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

User avatar
klapperstorch
Posts: 49
Joined: Fri Jan 26, 2007 8:43 am

Re: Special character treatment with Create Web Page

Post by klapperstorch » Tue Dec 17, 2013 8:30 am

Pierre,
may I call to your attention that this problem is still not solved?
All these years I have helped myself by avoiding these special characters in the text which is to be displayed on the web page.
But with the time I find this restriction cumbersome and inelegant.
Would it be possible to make this little change which I requested in the next release?
Thanks

User avatar
xnview
Author of XnView
Posts: 32403
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Special character treatment with Create Web Page

Post by xnview » Wed Dec 18, 2013 10:33 am

Ok, i'll check it
Pierre.

Post Reply