Skip to content
Advertisement

Tag: sanitization

Sanitize an external xml file with php

Here’s my problem: Essentially I need to use an XML file from an external source and loop it through to display nicely some data. I created a function that gets content from the external URL (file_get_contents), then I turn the string of XML into an object (I use LIBXML_NOCDATA as a parameter because it contains ), right after I turn

Sanitizing HTML input

I’m thinking of adding a rich text editor to allow a non-programmer to change the aspect of text. However, one issue is that it’s possible to distort the layout of a rendered page if the markup is incorrect. What’s a good lightweight way to sanitize html? Answer You will have to decide between good and lightweight. The recommended choice is

PHP input sanitizer function?

What’s a method to sanitize PHP POST data for passing to a mail function? (I prefer a method that’s not part of the mysql_function() family of functions.) I take the data, sanitize it, print it back to the user and send it in an email to a preset address. EDIT: I’m just sending the email to our email address so

Advertisement