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 May 31, 2024 07:53
Windows 10 - WSL LAMP Stack Setup