You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some older notebooks that I update from time to time. In those notebooks I do a bit of magic to manipulate cells and so on. That means I put in some HTML tags with a bit of JavaScript attached. However, lately, when I open up these notebooks I get the error message
Notebook failed to load
The error was:
TypeError: isPlainObject is not a function
See the error console for details.
Looking in the console I see that this happens when notebook.js tries to parse the HTML code - in particular if one uses attributes on some tags. To recreate this problem, make a notebook with a single Markdown cell with the content
and save the notebook (I attach such a notebook too). Then try to open that notebook again and you should see the error message above. I tracked the error down to the function sanitizeHtml in static/notebook/main.min.js which calls the function isPlainObject on the attributes of a tag to see if that attribute is whitelisted. However, it never gets that far, since the function isPlainObject is apparently not defined at that point. The function isPlainObjectis defined later in main.min.js as
module.exports = function isPlainObject(o) {
var ctor, prot;
if (isObjectObject(o) === false) return false; // If has modified constructor
ctor = o.constructor;
if (typeof ctor !== 'function') return false; // If has modified prototype
prot = ctor.prototype;
if (isObjectObject(prot) === false) return false; // If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
return false;
} // Most likely a plain Object
return true;
};
but is never "expoerted" to main.min.js (or at least too late).
hi,
I have some older notebooks that I update from time to time. In those notebooks I do a bit of magic to manipulate cells and so on. That means I put in some HTML tags with a bit of JavaScript attached. However, lately, when I open up these notebooks I get the error message
Looking in the console I see that this happens when
notebook.js
tries to parse the HTML code - in particular if one uses attributes on some tags. To recreate this problem, make a notebook with a single Markdown cell with the contentand save the notebook (I attach such a notebook too). Then try to open that notebook again and you should see the error message above. I tracked the error down to the function
sanitizeHtml
instatic/notebook/main.min.js
which calls the functionisPlainObject
on the attributes of a tag to see if that attribute is whitelisted. However, it never gets that far, since the functionisPlainObject
is apparently not defined at that point. The functionisPlainObject
is defined later inmain.min.js
asbut is never "expoerted" to
main.min.js
(or at least too late).This is running on Debian GNU/Linux "sid" with
using Google Chrome
Thank you.
Yours,
Christian
test.ipynb.gz
The text was updated successfully, but these errors were encountered: