In WordPress, getting the excerpt “safely” means ensuring that any HTML or JavaScript within it is properly sanitized to prevent Cross-Site Scripting (XSS) attacks.
WordPress actually handles this for you automatically, but how you do it depends on whether you want to echo it directly or store it in a variable.
Here are the safest ways to do it:
agsags
alksghalsjkhgalsjkghalsghaslkjghasg
as
asglhaslkghasg
- list
- list
- list
