Switch to more robust existing CSS escaping library
This commit is contained in:
parent
c678d91fe0
commit
1de2a24eb3
4 changed files with 13 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import escape from 'css.escape'
|
||||
|
||||
export default function escapeClassName(className) {
|
||||
return className.replace(/([^A-Za-z0-9\-])/g, '\\$1')
|
||||
return escape(className)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue