Project

General

Profile

Actions

Bug #10574

closed

Typing an apostrophe breaks free-entry portfolio fields

Added by Boone Gorges about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority name:
High
Assignee:
Category name:
Public Portfolio
Target version:
Start date:
2018-10-23
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

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.


Files

cacap-apostrophes.diff (2.29 KB) cacap-apostrophes.diff Boone Gorges, 2018-10-23 10:46 AM

Related issues

Related to CUNY Academic Commons - Bug #10565: Escape Characters show in Academic Interests on People PageResolvedBoone Gorges2018-10-19

Actions
Actions #1

Updated by Boone Gorges about 6 years ago

  • Related to Bug #10565: Escape Characters show in Academic Interests on People Page added
Actions #2

Updated by Boone Gorges about 6 years 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

Actions

Also available in: Atom PDF