CSS Escape function like JavaScript CSS.escape()

Are there any Elixir or Phoenix functions that escape CSS like CSS.escape?

I want to securely escape values for attribute selectors.

<style>
div[value="<%= "[value with double quote]" %>"] {
  background-color: blue;
}
</style>

<div value="1">One</div>
<div value="2">Two</div>
<div value="3">Three</div>

I would expect something like that to be in phoenix_html if it existed: Phoenix.HTML — Phoenix.HTML v4.1.1.