for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Box\Spout\Common\Helper\Escaper;
/**
* Class ODS
* Provides functions to escape and unescape data for ODS files
*/
class ODS implements EscaperInterface
{
* Escapes the given string to make it compatible with ODS
*
* @param string $string The string to escape
* @return string The escaped string
public function escape($string)
return htmlspecialchars($string, ENT_NOQUOTES | ENT_DISALLOWED);
}
* Unescapes the given string to make it compatible with ODS
* @param string $string The string to unescape
* @return string The unescaped string
public function unescape($string)
// ==============
// = WARNING =
// It is assumed that the given string has already had its XML entities decoded.
// This is true if the string is coming from a DOMNode (as DOMNode already decode XML entities on creation).
// Therefore there is no need to call "htmlspecialchars_decode()".
return $string;