Return from image_downsize() earlier if a custom resize function is used. props anatolbroder. fixes #23392.
Use correct escaping function. props jkudish. fixes #20771.
Remove unused error string. props pavelevap. fixes #22107.
Use correct escaping function. fixes #23334.