Explorer

html.escape-attribute

description
Escape a text for an attribute value in double quotes: & " < > become &amp; &quot; &lt; &gt;
type
Fn(text: String) -> String
expression
fn(text$0) =>
  @core.string-replace(
    text: @core.string-replace(
      text: @core.string-replace(text: @core.string-replace(text: $0, from: "&", to: "&amp;"), from: "\"", to: "&quot;"),
      from: "<",
      to: "&lt;"
    ),
    from: ">",
    to: "&gt;"
  )
visibility
public
html.escape-attribute (project html, branch main, snapshot hd1kHQmQUtgayk-Y5Eo_pcQPlqiL8dHKKndnKtdm-KI)
id: MPz6tScmquAsTmWWFJM6NXIat_pc17GHWif1g83G4Vg
content hash: YxrlYcS7LDYAlItVLMYQfymVXtytAZ01-iTrx7cgQ_s