Typing an apostrophe breaks free-entry portfolio fields
Haven't tested across browsers, but at least in Firefox:
1. Edit portfolio
2. Create 'Academic Interests' field
3. Type something that contains a single apostrophe
4. Click OK
Nothing happens, and you get a console error from jQuery. What appears to be happening is that the apostrophes are going into the DOM somewhere as unescaped, which means they're breaking jQuery's html() method.
I've played for a few minutes with a solution that catches apostrophe input and converts it to an HTML entity, but it doesn't seem to be a quick fix. I'm attaching a WIP diff so I can pick this up later.
#2 Updated by Boone Gorges 7 months ago
- Status changed from New to Resolved
Found it! I was using a bad technique for converting an HTML string to a jQuery object. https://github.com/cuny-academic-commons/cac-advanced-profiles/commit/0c598048e01efa8663e1a05af57f3b157b2bddc5