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


Permlink Replies: 14 - Pages: 1 - Last Post: 08-Dec-2015 15:40 Last Post By: jGromit Threads: [ Previous | Next ]
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Base skin menu is not html compliant
Posted: 04-Dec-2015 12:30
 
  Click to reply to this thread Reply
I did run the html validator on my Base skin test album and noticed that it contains invalid html code, see here.

You can easy repair this by replacing line 2986 in module Util by:
path = (String)vars.get("closeupPath").replaceAll(" ","%20");
.Thanks again Laza, for sharing your Util module!
Laza

Posts: 9,472
Registered: 6-Sep-2005
Re: Base skin menu is not html compliant
Posted: 04-Dec-2015 12:58   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Thanks,

I don't know - in theory jAlbum should encode the spaces in the "closeupPath" variable, but if "URL-encode links" is OFF, I don't know if it's good if the skin overwrites this behavior...
jGromit

Posts: 33,198
Registered: 31-Jan-2006
Re: Base skin menu is not html compliant
Posted: 04-Dec-2015 14:01   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
If you've told jAlbum not to URL-encode the links, the links should not be encoded by the skin. That would be like the skin forcing the inclusion of widget code even if you've turned off widgets in the jAlbum settings, just because the skin designer thinks you should always include it.

Granted, one should always choose to have jAlbum URL-encode the links. Offhand, I can't think of a situation in which you would not want to do that. But the jAlbum setting should control what happens, not the skin.
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Re: Base skin menu is not html compliant
Posted: 04-Dec-2015 14:56   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Well guys you are both correct! I did not know that such an URL encode check-mark did exist! I never touched it and indeed it was cleared.

If I set it the spaces problem disappears, but new problems with the cell spacing are displayed as you can see here.

I think jAlbum should as default set the 'URL-encode links'check-mark!
jGromit

Posts: 33,198
Registered: 31-Jan-2006
Re: Base skin menu is not html compliant
Posted: 04-Dec-2015 15:21   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
If I set it the spaces problem disappears, but new problems with the cell spacing are displayed....

Those errors have nothing to do with the URL encoding. It's just that Base is still using HTML tables for layout, and using the old-style table attributes instead of CSS to style the tables. They still work, of course, but should be changed for HTML5 compliance. You could easily do it yourself.

I think jAlbum should as default set the 'URL-encode links'check-mark!

I'm pretty sure it does that already.
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Re: Base skin menu is not html compliant
Posted: 04-Dec-2015 15:35   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Attachment screenshot.5.jpg (87,5 KB)
jGromit wrote:
I'm pretty sure it does that already.
That is incorrect, if I start a new project via File / New, the check-mark is cleared, see enclosed screenshot.
jGromit

Posts: 33,198
Registered: 31-Jan-2006
Re: Base skin menu is not html compliant
Posted: 04-Dec-2015 15:38   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
You've saved it with your defaults, so of course any new project will have it cleared. Duh.
RobM

Posts: 4,385
Registered: 4-Aug-2006
Re: Base skin menu is not html compliant
Posted: 05-Dec-2015 12:26   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Either URL encode links or Generate websafe names but not both, the last one set wins.
http://jalbum.net/help/en/jAlbum/Settings/Advanced
If this has changed the documentation needs updating.
jGromit

Posts: 33,198
Registered: 31-Jan-2006
Re: Base skin menu is not html compliant
Posted: 05-Dec-2015 13:53   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I believe that has changed. You can't set both - if you choose URL-encode links, the option to Generate web-safe file names is grayed out, implying that it's ineffective. And a quick test indicates that as long as URL-encode links is chosen, the status of the other checkbox makes no difference - it never generates web-safe file names.
Laza

Posts: 9,472
Registered: 6-Sep-2005
Re: Base skin menu is not html compliant
Posted: 07-Dec-2015 09:04   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
I believe once you've chosen to URL-encode the links, the web-unsafe file names is not an issue anymore, that's why it's grayed out.
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Re: Base skin menu is not html compliant
Posted: 07-Dec-2015 10:41   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
I believe once you've chosen to URL-encode the links, the web-unsafe file names is not an issue anymore, that's why it's grayed out.
So whether an album made with a skin is html compliant or not depends on 'URL-encode the links' setting of the skin user!
That is weird, the skin should produce always html compliant code!
I think the 'URL-encode the links' should be removed and jAlbum should always URL-encode the links (see this thread).
Laza

Posts: 9,472
Registered: 6-Sep-2005
Re: Base skin menu is not html compliant
Posted: 07-Dec-2015 11:00   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I don't see the point why one would turn off URL-encode links, but anyway, why shouldn't we let jAlbum manage it centrally? In the case of more complex skins it's not a big thing adding the URL-encoding, that's true, but think of Minimal skin. Why the skin should take care of the folder links?
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Re: Base skin menu is not html compliant
Posted: 07-Dec-2015 16:52   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
I don't see the point why one would turn off URL-encode links, but anyway, why shouldn't we let jAlbum manage it centrally?
Yes jAlbum should URL-encode links, but it should do that always, in which case this setting can be removed.
davidekholm

Posts: 21,479
Registered: 18-Oct-2002
Re: Base skin menu is not html compliant
Posted: 08-Dec-2015 15:15   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I've now changed the default for "URL encode links" from off to on. The reason why it has been set to off until now has been that some browsers (read IE) didn't allow local browsing when using URL encoded links. As we now have an embedded browser, I think we shouldn't regard that issue anymore. It's better to follow the URL encoding rules.
jGromit

Posts: 33,198
Registered: 31-Jan-2006
Re: Base skin menu is not html compliant
Posted: 08-Dec-2015 15:40   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
URL-encoded links appear to be OK in Edge, too.
Legend
Forum admins
Helpful Answer
Correct Answer

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