Page 1 of 1

CSS Validation

Posted: Mon Oct 26, 2015 10:55 am
by reinhardl
Hi,
this is a sniplet of the 2k11 entries.tpl row 93

Code: Select all


 {if $entry.viewmode eq $CONST.VIEWMODE_LINEAR}                 {$CONST.COMMENTS_VIEWMODE_LINEAR} | <a href="{$entry.link_viewmode_threaded}#comments" rel="nofollow">{$CONST.COMMENTS_VIEWMODE_THREADED}</a>
    {else}
        <a rel="nofollow" href="{$entry.link_viewmode_linear}#comments">{$CONST.COMMENTS_VIEWMODE_LINEAR}</a> | {$CONST.COMMENTS_VIEWMODE_THREADED}
 {/if}


when I validate my site with https://validator.w3.org/ I will get this error:

Error: Bad value /index.php?url=archives/5-Modul-Letzte-Meldungen.html&serendipity[cview]=linear#comments for attribute href on element a: Illegal character in query: not a URL code point.

From line 263, column 18; to line 263, column 135

<a rel="nofollow" href="/index.php?url=archives/5-Modul-Letzte-Meldungen.html&serendipity[cview]=linear#comments">Linear

Syntax of URL:
Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.
What must be escaped? {$entry.link_viewmode_threaded} ?

thanks

Re: CSS Validation

Posted: Mon Oct 26, 2015 11:08 am
by Timbalu
At the moment the second, but when we would really have to do this, both, I assume.
try a

Code: Select all

{$foo|escape:'url'}
I think the validator does not like [ and ].
(IMHO, its useless to correct, since all browsers can read this. We had his before, see: http://board.s9y.org/viewtopic.php?f=3&t=18374)