Escaped characters are: quotes (") and apostrophe (').
Examples:
echo Crawler::xpathLiteral('foo " bar');
prints 'foo " bar'
echo Crawler::xpathLiteral("foo ' bar");
prints "foo ' bar"
echo Crawler::xpathLiteral('a\'b"c');
prints concat('a', "'", 'b"c')
public static xpathLiteral ( string $s ) : string | ||
$s | string | String to be escaped |
return | string | Converted string |