Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Cure53 cure53

🎯
Focusing
Block or report user

Report or block cure53

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View XSS Protection in 5 common contexts
<?php
/**
* XSS protection function for HTML context only
* @usecases
* <title>use this function if output reflects here or as a content of any HTML tag.</title>
* e.g., <span>use this function if output reflects here</span>
* e.g., <div>use this function if output reflects here</div>
* @description
* Sanitize/Filter < and > so that attacker can not leverage them for JavaScript execution.
You can’t perform that action at this time.