Advertisement
Dario95

Untitled

Jul 15th, 2021 (edited)
964
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. 1.  <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <?php
  6. $str = '<a href="https://www.w3schools.com">Go to w3schools.com</a>';
  7. echo $str;
  8. echo htmlentities($str);
  9. ?>
  10.  
  11. <p>Converting characters into entities are often used to prevent browsers from using it as an HTML element. This can be especially useful to prevent code from running when users have access to display input on your homepage.</p>
  12.  
  13. </body>
  14. </html>
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement