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


Permlink Replies: 8 - Pages: 1 - Last Post: 04-May-2019 01:11 Last Post By: Laza Threads: [ Previous | Next ]
JerryM

Posts: 107
Registered: 19-Apr-2004
Phantom text entries under Folders -characters in Title interpreted as code
Posted: 01-May-2019 12:52
 
  Click to reply to this thread Reply
Dear Laszlo !

I have phantom text entries under the Folders on this webpage. They are composed from Titel and Comment and formatted as link.

https://cross-press.net/Docu/GLAUBE/World/2018.10.13-28_KroatischeRadWallfahrt-Rom/index.htm

I have
<h3>${title}</h3> <div class="comment">${commentShort}</div>
in Section/Folders/Caption template. Deleting this entries doesn't affect the phantom text.

This issue have occurred suddenly after I updated Tiger to version before the last one. Update to last version didn't help.

Thank's in advance for support.
Jerry

P.S. I just find out what's the problem. :) Phantom entries appear only under folders that have -> in title. Obviously jA/Tiger or java compiler are interpreting this as a code.

P.P.S. There is also a little issue in local project preview (not on webpage), special characters in title are shown as small x. I.e.:

"Tag 1, Marija Bistrica -> Zaprešić -> Krašić" looks like
"Tag 1, Marija Bistrica -> Zaprexix -> Kraxix

Edited by: JerryM on 01-May-2019 12:52
jGromit

Posts: 7,579
Registered: 31-Jan-2006
Re: Phantom text entries under Folders -characters in Title interpreted as code
Posted: 01-May-2019 12:58   in response to: JerryM in response to: JerryM
Helpful
  Click to reply to this thread Reply
This is happening because the code for generating alt attributes is broken. See:

https://jalbum.net/forum/thread.jspa?threadID=55133

The quick fix is to turn off the alt tags. See Tiger - Site - Site admin - Search Engine Optimization - Add ALT tags for search engines
JerryM

Posts: 107
Registered: 19-Apr-2004
Re: Phantom text entries under Folders -characters in Title interpreted as code
Posted: 01-May-2019 13:18   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
You are terrific, JeyGee, thank you ! :) :)
MarkusD

Posts: 471
Registered: 13-Apr-2006
Re: Phantom text entries under Folders -characters in Title interpreted as code
Posted: 01-May-2019 13:36   in response to: JerryM in response to: JerryM
 
  Click to reply to this thread Reply
{quote:title=JerryM wrote:}> P.P.S. There is also a little issue in local project preview (not on webpage), special characters in title are shown as small x. I.e.:

"Tag 1, Marija Bistrica -> Zaprešić -> Krašić" looks like
"Tag 1, Marija Bistrica -> Zaprexix -> Kraxix

I recommend this page to „translate“ umlauts and other special characters to web-safe code.

It translates to:
Tag 1, Marija Bistrica -> Zapre&amp;#353;i&amp;#263; -> Kra&amp;#353;i&amp;#263;
jGromit

Posts: 7,579
Registered: 31-Jan-2006
Re: Phantom text entries under Folders -characters in Title interpreted as code
Posted: 01-May-2019 13:51   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Attachment ss005490.png (111.0 KB)
Attachment ss005492.png (522.4 KB)
MarkusD wrote:
I recommend this page to „translate“ umlauts and other special characters to web-safe code.

Not necessary. jAlbum handles these characters properly on its own. A quick example (which I will delete soon):

(demo album removed)

No special encoding needed. The default jAlbum settings are fine: ISO-8859-1, Write UTF-8.

Can we please stop continually overcomplicating things?

ETA: No problem in the Explore view or in the integrated browser preview, either - see screenshots.

Edited by: jGromit on 01-May-2019 07:56
Laza

Posts: 2,178
Registered: 6-Sep-2005
Re: Phantom text entries under Folders -characters in Title interpreted as code
Posted: 02-May-2019 08:35   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
This is also a bad practice because neither the tag cloud nor the search function will work such HTML entities.
MarkusD

Posts: 471
Registered: 13-Apr-2006
Re: Phantom text entries under Folders -characters in Title interpreted as code
Posted: 02-May-2019 17:49   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
This is also a bad practice because neither the tag cloud nor the search function will work such HTML entities.
Hmm, I had the impression that using umlauts and other critical characters in a HTML page does work, because todays browsers are „tolerant“ but in the long run it would be better to not use these characters but instead the HTML entities. It seems that my impression was completely wrong.

Thanks for the info.
jGromit

Posts: 7,579
Registered: 31-Jan-2006
Re: Phantom text entries under Folders -characters in Title interpreted as code
Posted: 02-May-2019 18:07   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
They're HTML entities. Which means that a browser understands them when it's displaying the page. But Java and Javascript have no idea what they mean. So any Javascript-based search routine will find an entry like Belgi&euml; only if the person doing the searching also enters the HTML entity, rather than entering België.

Further, HTML entities don't work in a URL. There, a different encoding scheme is needed, something that jAlbum takes care of for you. But if there are HTML entities in a string that is subsequently used to create a URL, that encoding will fail, because the encoder will encode the ampsersand and the semicolon. That will yield a very different string than would be the case if the encoder is presented with an actual e-umlaut.

There is generally little need to use HTML entities these days, with some exceptions. First, there are things like a non-breaking space, &nbsp;, which has no true character equivalent. It's also necessary to use an HTML entity to "escape" a character like <, which a browser would assume is the beginning of an HTML tag.

It's safer to use an HTML entity for an ampersand, just to avoid the possibility that the ampersand will be seen by the browser as being the beginning of an entity.

Don't even get me started on single- and double-quotes, however. That's a can of worms because of nesting problems. A quick illustration.... Let's say you're trying to use an entered comment as the alt attribute on an image. This would be OK:
alt="Here's a quote"
But this would be invalid HTML:
alt='Here's a quote'
This is the kind of stuff that makes skin developers crazy.
Laza

Posts: 2,178
Registered: 6-Sep-2005
Re: Phantom text entries under Folders -characters in Title interpreted as code
Posted: 02-May-2019 18:33   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
The worst of all when a user is using accented characters in file names, and then the visitor selects it through the feedback, and the skin passes its name to the email application, which sends the email to the author and in the end the link to the picture still have to work.
Legend
Forum admins
Helpful Answer
Correct Answer

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