Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
06e7e5b1b8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/single-file/serializer.js

+ 1 - 1
lib/single-file/serializer.js

@@ -72,7 +72,7 @@ this.serializer = this.serializer || (() => {
 		Array.from(element.attributes).forEach(attribute => {
 			let value = attribute.value;
 			if (attribute.name == "class") {
-				value = element.classList.toString();
+				value = element.classList.toString().trim();
 			}
 			value = value.replace(/&/g, "&").replace(/\u00a0/g, " ").replace(/"/g, """);
 			const validUnquotedValue = value.match(/^[^ \t\n\f\r"'`=<>]+$/);