[facet] ensure a facet DOM id is a valid jQuery identifier. Closes #2789089
--- a/web/facet.py Mon Feb 04 14:39:55 2013 +0100
+++ b/web/facet.py Wed Apr 03 10:51:15 2013 +0200
@@ -65,7 +65,7 @@
from cubicweb import Unauthorized, typed_eid
from cubicweb.schema import display_name
-from cubicweb.uilib import css_em_num_value
+from cubicweb.uilib import css_em_num_value, domid
from cubicweb.utils import make_uid
from cubicweb.predicates import match_context_prop, partial_relation_possible
from cubicweb.appobject import AppObject
@@ -1449,7 +1449,7 @@
def _render(self):
w = self.w
title = xml_escape(self.facet.title)
- facetid = make_uid(self.facet.__regid__)
+ facetid = domid(make_uid(self.facet.__regid__))
w(u'<div id="%s" class="facet">\n' % facetid)
cssclass = 'facetTitle'
if self.facet.allow_hide: