css icon indicating copy to clipboard operation
css copied to clipboard

Question marks are not handled correctly in CSS.parse()

Open snehilshah opened this issue 11 months ago • 0 comments

Question marks needs \\ as we must also escape the backslash itself, using another backslash, like: "\?". See example in JS section

Minimal reproducible example, this should not fail.

package main

import (
    "fmt"

    "github.com/ericchiang/css"
)

func main() {
    s := "link[href*=css\\\\?family]"

    _, err := css.Parse(s)
    if err != nil {
        fmt.Println("Error: ", err)
    }
}

snehilshah avatar Feb 28 '25 06:02 snehilshah