I think escaping quotes only matters for attributes (which can use ' or ").
Example:
<img src="$url">
Exploit: foo.jpg" onload="alert('pwned') <img src="$url">
Exploit: foo.jpg" onload="alert('pwned')