Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 539 Bytes

0415.md

File metadata and controls

22 lines (18 loc) · 539 Bytes

Using htmlspecialchars() is useful for preventing malicious JavaScript from executing, as well as for generating valid HTML. What is the output of the following script?

$str = <<<EOF
<p>me & you
EOF;
echo htmlspecialchars($str);
  • A) <p>me & you
  • B)

    me & you

  • C)

    me &amp you

  • D)

    me & you

Answer

Answer: A