Control: severity -1 minor
Control: affects -1 src:theano
Control: retitle -1 libjs-d3: SyntaxError - non-ASCII variable names

This actually does have practical consequences: because d3's source contains Greek-alphabet variable names (e.g. in http://sources.debian.net/src/d3/3.5.17-2/src/math/trigonometry.js) and the Debian-minified version keeps these, using it in a document that doesn't declare a character encoding is a SyntaxError.

e.g. after replacing theano's embedded copy of d3 with a symlink to the Debian package, d3viz diagrams fail to appear, and and checking the developer console finds this:

SyntaxError: illegal character  d3.v3.min.js:1:31212
ReferenceError: d3 is not defined[Learn More]  d3-context-menu.js:1:1
ReferenceError: d3 is not defined[Learn More]  mlp.html:50:3
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

Using uglifyjs -m -c (i.e. also minify variable names) fixes this problem; I haven't tried upstream's script (http://sources.debian.net/src/d3/3.5.17-2/bin/uglify/ ) but it looks like it also would.

Reply via email to