Skip to content

Instantly share code, notes, and snippets.

@xeoncross
xeoncross / clean_html.php
Created March 8, 2013 17:28
Sanitize HTML using PHP and the DOMDocument
<?php
/**
* Clean HTML string removing all element attributes and elements which are
* not in the provided whitelist (but keeping their allowed children).
*
* @see https://github.com/alixaxel/phunction/blob/master/phunction/HTML.php
* @param string $html to clean
* @param array $whitelist
*/
function clean_html($html, array $whitelist)
@aslamdoctor
aslamdoctor / wsl-lamp.md
Last active September 16, 2024 01:32
Windows 10 - WSL LAMP Stack Setup