What are common pitfalls when using div tags in PHP templates with Smarty?

One common pitfall when using div tags in PHP templates with Smarty is forgetting to properly escape variables to prevent XSS attacks. To solve this issue, always use the Smarty escape modifier when outputting variables within div tags.

<div>{$variable|escape}</div>