Commit c3324b9a authored by Dries's avatar Dries
Browse files

- Patch #58956 by timcn: prevent multiple class names from being glued together.

parent 1eca161b
......@@ -259,7 +259,8 @@ function removeClass(node, className) {
if (!hasClass(node, className)) {
return false;
}
node.className = eregReplace('(^| )'+ className +'($| )', '', node.className);
// Replaces words surrounded with whitespace or at a string border with a space. Prevents multiple class names from being glued together.
node.className = eregReplace('(^|\\s+)'+ className +'($|\\s+)', ' ', node.className);
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment