Skip to content Skip to sidebar Skip to footer
Showing posts with the label Xss

Is It Better To Escape/encode The User Input Before Storing It To Database Or To Store It As It Is In Database And Escape It While Retrieving?

I am using htmlspecialchars() function to prevent XSS attacks. I have doubt regarding what is the b… Read more Is It Better To Escape/encode The User Input Before Storing It To Database Or To Store It As It Is In Database And Escape It While Retrieving?

Avoiding Xss When Echoing Posted Html

I have a web page which needs to do the following: dynamically create an HTML fragment using JavaS… Read more Avoiding Xss When Echoing Posted Html

Sanitize All Scripts From Html String

The HTML5 clipboard is awesome, but I am looking for a way to make it safe. The user is pasting tex… Read more Sanitize All Scripts From Html String

Php Security - Combining Functionality Of Strip_tags(); & Htmlspecialchars();

I want my forum users to be able to insert links and other allowed tags. For example I would like t… Read more Php Security - Combining Functionality Of Strip_tags(); & Htmlspecialchars();

Sanitize Html5 With Php (prevent Xss)

I'm building WYSIWYG editor with HTML5 and Javascript. I'll allow users post pure HTML via … Read more Sanitize Html5 With Php (prevent Xss)

Some Chars Encoded During Post While Others Are Not

TL;DR CodeIgniters' Security Class directly manipulates your Globals such as $_POST and it find… Read more Some Chars Encoded During Post While Others Are Not

Making User-made Html Templates Safe

I want to allow users to create tiny templates that I then render in Django with a predefined conte… Read more Making User-made Html Templates Safe

How To Use Htmlpurifier To Allow Entire Document To Be Passed Including Html,head,title,body

Given the code below, how do I use htmlpurifier to allow the entire contents to pass through. I wan… Read more How To Use Htmlpurifier To Allow Entire Document To Be Passed Including Html,head,title,body