Closed Bug 978912 Opened 7 years ago Closed 7 years ago
Mapping "->" to "->" in Notes
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36 Steps to reproduce: 1. Start Notes app in Firefox OS v1.1 (Alcatel OneTouch Fire). 2. Add a new note. 3. Enter "->" in the text field. 4. Save by hitting "Done." (leads to closing this note) 5. Reopen the note. Actual results: The "->" is translated to "->" (html entity) Expected results: I'd expected to see "->" again or even better → (→).
Yan, can you take a look?
Matias, I see the code is converting '&' to '&' before saving to storage, in evernote.js:1066: var text = child.nodeValue.replace(/</g, "<").replace(/>/g, ">").replace(/&(?!amp;)/g, "&"); Why is this line needed? The data should already be in HTML, no?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Even if the input is in plain text, the replace order is wrong. Ampersands must be replaced before any other meta characters: var text = child.nodeValue.replace(/&(?!amp;)/g, "&").replace(/</g, "<").replace(/>/g, ">");
Yan, the replacement was needed after we received a review saying everything is deleted after typing '&' in the note body. I think that if you change the replace order like Masatoshi suggested it will work fine.
This doesn't have r+ AFAICT.
I was able to verify this issue as Fixed in the following build with the latest version of Notes app: v1.3 Environmental Variables: Device: Buri v1.3 MOZ BuildID: 20140410004002 Gaia: 62acb4b0e774b6709b8be400d849f807404bb21b Gecko: 94baf6039462 Version: 28.0 Firmware Version: v1.2-device.cfg
You need to log in before you can comment on or make changes to this bug.