User tests: Successful: Unsuccessful:
When we do not provide an ID for a select or grouped select list Joomla will create the ID based on the name of the field. The name is more permissive than an ID. We already remove brackets from the name but spaces are also not allowed in IDs. This pull request removes the spaces from the generated ID value.
<?php echo JHtml::_(
'select.genericlist',
array(1,2),
'Desc. field',
);
?>
Uncaught Error: Syntax error, unrecognized expression: #Desc. field-lbl
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Milestone |
Added: |
Category | ⇒ | Fields Libraries |
Milestone |
Removed: |
@yvesh Ideally we filter everything to make it adhere to the standard, not sure what the impact will be and where it may be a B/C issue. The brackets are OK for names as it constitutes an array. As for the space in and ID, you simply can't target the element, so it will never work. At least for jQuery, a space in the name doesn't seem to be a problem.
I have tested this item successfully on 607a42e
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Milestone |
Added: |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-04-25 12:55:57 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
Milestone |
Removed: |
Milestone |
Added: |
Milestone |
Added: |
Milestone |
Removed: |
I have tested this item successfully on 607a42e
Tested, works as expected.
@roland-d What about the name attribute though? It still contains a space.. I know this is not important for the javascript validation, but when we do it for the id we should probably do it for the name also.
And what about filtering other special characters? In HTML 5 everything is allowed except the space, but in XHTML / HTML 4..
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10072.