Closed (fixed)
Project:
Webform
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Mar 2009 at 15:47 UTC
Updated:
9 Feb 2010 at 07:38 UTC
i found that the xhtml created by is invalid when the components have latin characters like ã ç or commas etc.
here's the error returned by http://validator.w3.org/check
Line 276, Column 242: character "(" is not allowed in the value of attribute "id"
…-profissional-disponibilidade-Misto-(Pós-–-Laboral-e-Sábados)" value="Misto (
check this example
<input id="edit-submitted-recursos-humanos-e-formacacao-profissional-enumere-as-razoes-pelas-quais-nunca-frequentou-uma-accao-de-formacao-Não-existe,-na-localidade,-estruturas-de-apoio-à-formação" class="form-checkbox" type="checkbox" value="Não existe, na localidade, estruturas de apoio à formação" name="submitted[recursos_humanos_e_formacacao_profissional][enumere_as_razoes_pelas_quais_nunca_frequentou_uma_accao_de_formacao][Não existe, na localidade, estruturas de apoio à formação]"/>
Não existe, na localidade, estruturas de apoio à formação
</label>
| Comment | File | Size | Author |
|---|---|---|---|
| webformbug.png | 19.72 KB | fmmribeiro |
Comments
Comment #1
quicksketchThanks for the report. This is the way Drupal handles all checkboxes in the entire system. I'm not entirely sure where to correct this problem. You can always theme the form (see THEMING.txt) to add additional classes to checkboxes if you need to target them specifically with jQuery.
Alternatively, if you use key|value pairs to specify your values, you can shorten up the value (and therefor the ID) of your checkboxes.
Comment #2
quicksketchThis has been fixed in 3.x, where checkboxes are now just assigned numeric IDs (1, 2, 3, etc.), which should enforce correct HTML. In the 2.x version I'd suggest using key|value pairs until you can upgrade (though using key|value pairs is always a good idea anyway).