diff --git a/plugins/from_html.js b/plugins/from_html.js
index 42a7c1502..8293ff266 100644
--- a/plugins/from_html.js
+++ b/plugins/from_html.js
@@ -265,7 +265,7 @@
}
// Try class names
- classNames = element.className ? element.className.split(' ') : [];
+ classNames = typeof(element.className) === 'string' ? element.className.split(' ') : [];
for (i = 0; i < classNames.length; i++) {
handlers = elementHandlers['.' + classNames[i]];
if (!isHandledElsewhere && handlers) {