What are some potential pitfalls when using the PHPLIB template system in PHP?

One potential pitfall when using the PHPLIB template system in PHP is the lack of proper escaping of user input, which can lead to security vulnerabilities such as cross-site scripting (XSS) attacks. To prevent this, always make sure to properly escape any user input before outputting it in the template.

// Example of properly escaping user input before outputting it in a PHPLIB template
$userInput = "<script>alert('XSS attack!');</script>";
$escapedUserInput = htmlspecialchars($userInput, ENT_QUOTES, 'UTF-8');
$template->set_var('user_input', $escapedUserInput);