Closed (won't fix)
Project:
Facet API
Version:
7.x-1.0-beta7
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2011 at 02:50 UTC
Updated:
31 Oct 2012 at 14:30 UTC
Sample output:
<ul class="facetapi-facet-im-62-field-stream" id="facetapi-facet-apachesolrsolr-block-im-62-field-stream">
<li class="leaf first"><a href="/search/site/summit?f[0]=im_62_field_stream%3A1335" class="facetapi-inactive">Employment (1)</a></li>
<li class="leaf"><a href="/search/site/summit?f[0]=im_62_field_stream%3A1338" class="facetapi-inactive">International (1)</a></li>
<li class="leaf last"><a href="/search/site/summit?f[0]=im_62_field_stream%3A1340" class="facetapi-inactive">Skills (1)</a></li>
</ul>Sample error from http://html5.validator.nu/:
Error: Bad value /search/site/summit?f[0]=f[0]=im_62_field_stream%3A1335 for attribute href on element a: Illegal character in query component.
I had a quick look over the code, and couldn't find anything obvious. Apologies if this is actually a core issue. Note: this doesn't appear to be an issue for HTML4, or XHTML1 strict.
Comments
Comment #1
cpliakas commentedHi daniel.nitsche.
Respectfully marking this as won't resolve, because the list is generated from the core theme_item_list() function. Therefore the underlying issue is in that function since it apparently doesn't handle some characters correctly. Also, the theme function is able to be overridden so you can adhere to whatever standard you need to. I am definitely in favor of HTML 5, but I am not sure it is Facet API's job to enforce it in the specific instance cited in the original post. In addition, I don't believe it is a requirement that D7 be HTML 5 compliant, although it would be a positive thing IMHO.
Thanks for posting,
Chris
Comment #2
daniel.nitsche commentedThanks Chris, I figured as much but thought it was worth posting.
Comment #3
cpliakas commentedAbsolutely worth posting, and thanks for bringing it up.
Comment #4
mariotux commentedI have the same problem, I am making a project who have to validate with w3c and the facetapi's blocks is a problem to do it. Do not exists a easy solution for do that...
Any ideas?
Comment #5
cpliakas commentedYes. The solution is to override the theme function or make a new HTML5 compliant widget. Facet API is very extensible, so it would be a great contribution to make an HTML5 compliant widget if you wanted to do something that is repeatable by others.
Comment #6
dman commentedNot to open an old thread, but to add a cross-ref for searchers ...
It;s not the fault of Facet API, and certainly not of theme_item_list()
#1827854: W3C HTML5 Validation error with PHP array-based query-strings built with url() containing [ ] characters (eg views filters)
Comment #7
cpliakas commenteddman,
Thanks for the additional info! Definitely relevant.
Chris