xwiki/xwiki-platform — pull request #26 by sorzu (2011-11-14 09:42:43+00:00)
Title: XWIKI-7145 : Livetable does not support column names with special characters and/or Unicode characters

If we specify in the #livetable macro some column names which contain special characters (such as '.' for example) or Unicode characters, the livetable will not load the rows (although the JSON is loaded) because of a JS error. The inline JS script generated in macros.vm (#livetablecallback macro) creates for each table row some objects named 'row', which contain the respective JSON data. That data is accessed via the "dot" notation (row.) and this causes the JS to crash if the property name is not a valid JS object property name. We should instead use the "array" notation (row[""]) to make sure we don't have such conflicts, as no one can guarantee that the received JSON has "safe" column names.