Hi Simon, Thanks for your report. We do try to sanitize inputs, but this is one we missed.
On Fri, Jan 27, 2017 at 5:05 AM, Laughninja <[email protected]> wrote: > Hi, > > we had a similar Issue, with leading spaces in the className property. It > used to work fine and it suddenly stopped working. > > var current = dataTable.getProperty(row, c, 'className') || ""; > dataTable.setProperty(row, c, 'className', current + ' currentDate'); > table.draw(data, tableOptions); > >> > If current was empty, this would cause the following error: > > "Failed to execute 'add' on 'DOMTokenList': The token provided must not > be empty." > > When trimming the string works fine, even with multiple classes set: > > dataTable.setProperty(row, c, 'className', (current + ' > currentDate').trim()); > > I realize that this might be a usage issue, but maybe the API could > sanatize the inputs? At least I hope by leaving this here, it'll help > others. > > Best, > Simon > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to google-visualization-api@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/7471355d-2386-438c-8304- > d8cfcd7b52a2%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/7471355d-2386-438c-8304-d8cfcd7b52a2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJPAc3Thum0we49u4guRKqxZCpswg2UVKDzsxAoaBD169Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
