You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the browser, there is the CSS.escape function that is very useful when constructing CSS selectors. It would be great if Floki had a similar functionality. Instead of Floki.find(html, "##{id} .foo") we could write Floki.find(html, "##{Floki.css_escape(id)} .foo"). This could be especially useful in LiveView tests.
Feature goal
In the browser, there is the
CSS.escape
function that is very useful when constructing CSS selectors. It would be great if Floki had a similar functionality. Instead ofFloki.find(html, "##{id} .foo")
we could writeFloki.find(html, "##{Floki.css_escape(id)} .foo")
. This could be especially useful in LiveView tests.Relates to: #551
Relates to: phoenixframework/phoenix_live_view#3159
Relates to: phoenixframework/phoenix_live_view#3145
Dependencies
A functionality like this would require Floki to be able to properly parse the escaped values. I'm not sure if this is currently always the case.
The text was updated successfully, but these errors were encountered: