Closed
Bug 978912
Opened 11 years ago
Closed 11 years ago
Mapping "->" to "->" in Notes
Categories
(Firefox OS Graveyard :: Gaia::Notes, defect)
Firefox OS Graveyard
Gaia::Notes
Tracking
(b2g-v1.3 verified, b2g-v1.3T fixed, b2g-v1.4 fixed)
RESOLVED
FIXED
1.4 S3 (14mar)
People
(Reporter: andre.jaenisch, Assigned: yor)
Details
Attachments
(1 file)
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 → (→).
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
Flags: needinfo?(matias)
Comment 3•11 years ago
|
||
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, ">");
Comment 4•11 years ago
|
||
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.
Flags: needinfo?(matias)
Keywords: checkin-needed
Attachment #8387052 -
Flags: review?(matias)
Updated•11 years ago
|
Attachment #8387052 -
Flags: review?(matias) → review+
Keywords: checkin-needed
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-b2g-v1.4:
--- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S3 (14mar)
Comment 8•11 years ago
|
||
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
status-b2g-v1.3:
--- → verified
Updated•11 years ago
|
status-b2g-v1.3T:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•