mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
fix tag values with whitespace causing css bugs (#9637)
This commit is contained in:
@@ -159,7 +159,12 @@ export function svgTagClasses() {
|
||||
classes.push('tag-wikidata');
|
||||
}
|
||||
|
||||
return classes.join(' ').trim();
|
||||
// ensure that classes for tags keys/values with special characters like spaces
|
||||
// are not added to the DOM, because it can cause bizarre issues (#9448)
|
||||
return classes
|
||||
.filter(klass => /^[-_a-z0-9]+$/.test(klass))
|
||||
.join(' ')
|
||||
.trim();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user