CSS Validation

Found a bug? Tell us!!
Post Reply
reinhardl
Regular
Posts: 258
Joined: Wed Jun 20, 2007 8:54 am
Location: Germany

CSS Validation

Post 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
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: CSS Validation

Post 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)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply