mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-17 21:48:07 +01:00
fix(module): prevent safelisting dynamic :color variables
This commit is contained in:
@@ -119,7 +119,7 @@ export const generateSafelist = (colors: string[]) => ['avatar', 'badge', 'butto
|
||||
|
||||
export const customSafelistExtractor = (prefix, content: string) => {
|
||||
const classes = []
|
||||
const regex = /<(\w+)\s+[^>]*color=["']([^"']+)["'][^>]*>/gs
|
||||
const regex = /<(\w+)\s+[^>:]*color=["']([^"']+)["'][^>]*>/gs
|
||||
const matches = [...content.matchAll(regex)]
|
||||
|
||||
for (const match of matches) {
|
||||
|
||||
Reference in New Issue
Block a user