Top "Sanitization" questions

Data sanitization to prevent code injection

angular translate sanitize / escape

I got a strange or maybe intended behavior with angular translate. Our value strategie is $translateProvider.useSanitizeValueStrategy('sanitize'); We use …

javascript angularjs sanitization angular-translate
Usage of esc_url, esc_html, esc_attr ... functions

When are definitely needed or for a good practice to use escaping functions? Such as using esc_url(); with: get_…

wordpress escaping sanitization
Angular 6 unit testing component with DomSanitizer dependency

In a unit test to just create (instantiate) a component that has a DomSanitizer dependency, how does one mock / stub …

angular unit-testing sanitization
PHP code to generate safe URL?

We need to generate a unique URL from the title of a book - where the title can contain any …

php regex string url-rewriting sanitization
How do I properly sanitize data received from a text area, when outputting it back into the text area?

A user will input text in a textarea. It is then inserted directly into a mySQL database. I use trim, …

php mysql html forms sanitization
Detecting a (naughty or nice) URL or link in a text string

How can I detect (with regular expressions or heuristics) a web site link in a string of text such as …

language-agnostic url sanitization spam-prevention
Sanitizing PHPSESSID

I'm passing PHPSESSID to a PHP page (via POST) and I was wondering what's the best way of sanitizing the …

php session sanitization
How best to sanitize fields in ruby on rails

I currently have a controller capturing some html from TinyMCE on the front end. If I tinker with firebug it …

ruby-on-rails ruby-on-rails-3 activerecord tinymce sanitization
What is the correct way to make web form input safe for a variety of contexts?

What do you all think is the correct (read: most flexible, loosely coupled, most robust, etc.) way to make user …

php design-patterns user-input sanitization