-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm attempting to replace the a Google Fonts stylesheet URL with the contents of the stylesheet. I was using HTMLRewriter about a week ago and it was working fine, but I noticed today after I published to my worker, that it stopped working as expected even though it I had not made any changes that would have made a difference.
So, I started testing out different selectors. This seems to work fine:
rewriter.on(`link[href*="fonts.googleapis.com/css"]`, ...)
But, when a colon was added to the font, it wouldn't work, and the handler would not be called:
rewriter.on(`link[href*=":fonts.googleapis.com/css"]`, ...)
I was having issues with these two cases as well. This works fine:
rewriter.on(`[href*="fonts.googleapis.com/css?family"]`, ...)
But, this does not:
rewriter.on(`[href*=fonts.googleapis.com/css?family=Lato"]`, ...)
It feels like the last two cases could be an issue with the equals sign.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working