Skip to content

Commit

Permalink
fix escapeCSSValue
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Jan 12, 2025
1 parent 430aa88 commit 2ad739c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datex-bindings/dom-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,9 @@ export class DOMUtils {


escapeCSSValue(value: any) {
return value?.toString().replaceAll(/[;{}()]/g, '');
return (value?.toString() as string).replace(/(;[\S\s]*)$/, (_, p1) => {
return '/*' + p1.replace(/\*\//, "* /") + '*/';
})
}


Expand Down

0 comments on commit 2ad739c

Please sign in to comment.