Jump to content

htmlspecialchars ENT_QUOTES help


MDanz

Recommended Posts

If you do not use ENT_QUOTES and the content of $var contains a single quote mark it will break that output. Take the example of the value being "Tom O'Maley" (without the double quotes). The output would be

<div data-title='Tom O'Maley'>Tom O'Maley</div>

 

The value of the data-title parameter would resolve to "Tom O" because the single quote in "O'Maley" would close the opening single quote for that parameter.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.