Skip to content

Commit

Permalink
handle hex encoded ampersand
Browse files Browse the repository at this point in the history
  • Loading branch information
sastan committed Nov 13, 2022
1 parent eeb8049 commit a61e0d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/neat-swans-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'twind': patch
---

handle hex encoded ampersand
2 changes: 1 addition & 1 deletion packages/twind/src/internal/parse-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ export function fixClassList(value: string, quote: string): string {
? // `"` -> " " "
value.replace(/(=|\[)(?:"|"|")|(?:"|"|")(])/g, `$1"$2`)
: value
).replace(/(&|&#38)/g, '&')
).replace(/(&|&|&)/g, '&')
}

0 comments on commit a61e0d1

Please sign in to comment.