Giovanni Aceto
Giovanni Aceto

Reputation: 1

Wordpress not sanitizing double quotes in image alt text text fields causing pages to break

Currently, when users put double quotes in the alt text field for an image in the media library or within the ACF edit window, those quotes get saved to the database within the alt field and rendered into the HTML. They aren't getting sanitized or stripped out. This is breaking pages where those images get rendered.

I haven't been able to find a hook to fix this. Preferably, I would need to strip these quotes out before they get saved to the database.

I'm unsure if it's Ajax or if there's a filter or action I can use to fix this.

Upvotes: 0

Views: 64

Answers (0)

Related Questions