Skip to content

Instantly share code, notes, and snippets.

View thomasbachem's full-sized avatar

Thomas Bachem thomasbachem

View GitHub Profile
<?php
/**
* Uses a concat() statement to provide proper escaping of single
* and double quotes for XPath strings.
*
* @link http://kushalm.com/the-perils-of-xpath-expressions-specifically-escaping-quotes
* @param string $value
* @return string
*/