What are common pitfalls when using Smarty in a PHP project?

Common pitfalls when using Smarty in a PHP project include not properly escaping user input, which can lead to security vulnerabilities such as cross-site scripting attacks. To solve this issue, always use Smarty's built-in escape functions like `{$var|escape}` to sanitize user input before displaying it on the page.

// Example of properly escaping user input in Smarty
$smarty->assign('userInput', '<script>alert("XSS attack");</script>');
```

```smarty
// In the Smarty template file
{$userInput|escape}