# Migrating to Azumi v42

## What Changed

### 1. `Raw()` is unconditionally blocked in `html!`

ALL usages of `Raw()` inside `html!` are now compile errors. Previously, only patterns with JS/CSS/HTML content were blocked.

**Fix:** Use safe alternatives:

```diff
- html! { @{Raw(format!("<div>{}</div>", x))} }
+ html! { <div>{x}</div> }

- html! { @{Raw("<script>...</script>")} }
+ html! { <script>{js_var}</script> }

- html! { @{Raw("<style>...</style>")} }
+ html! { <style>{css_var}</style> }

- html! { @{Raw(format!("window.__DATA__ = {}", data))} }
+ html! { {azumi::json_data!("DATA" = &data)} }
```

### 2. `format!()` with web patterns is blocked

`format!("<div>{}</div>", x)` inside `html!` expressions is now a compile error.

**Fix:** Build content outside `html!` and pass as a variable:

```diff
- html! { {format!("<div class='{}'>{}</div>", cls, val)} }
+ // Build outside html!
+ let content = format!("<div class='{}'>{}</div>", cls, val);
+ // Then use auto-escaping
+ html! { <div class={cls}>{val}</div> }
```

### 3. `TrustedHtml` removed from prelude

`TrustedHtml` is `#[doc(hidden)]` and no longer exported in the prelude.

**Fix:** Use safe injection patterns (json_data!, inline_css!, inline_script!) instead.
