[Vtigercrm-developers] illegal HTML5 element ids

Adam Heinz amh at metricwise.net
Thu Jun 6 03:06:10 UTC 2013


I've recently come across some behavior where some of my jQuery #foo id
selectors are failing to match.  It ends up that some sections of the
vtiger codebase concatenate field label with a static string to create the
element id [1] et al.  This is problematic when the label contains a space
in it, as we now have an illegal HTML5 id [2].  The workaround is to use a
jQuery attribute selector [id='foo bar'].  The fix is... to use fieldname?
 Maybe module+fieldname to avoid collisions?  The blast radius of such a
change is way outside my current scope of work, but definitely worth
thinking about for vtiger 8.

[1]
http://trac.vtiger.com/cgi-bin/trac.cgi/browser/vtigercrm/branches/6.0.0/Smarty/templates/DetailViewFields.tpl#L28
[2]
http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130605/12126906/attachment.html>


More information about the vtigercrm-developers mailing list