Ticket #6592 (closed defect: fixed)

Opened 8 months ago

Last modified 4 months ago

InlineEditBox: does not replace " with " on editor creation

Reported by: guest Owned by: bill
Priority: normal Milestone: 1.2
Component: Dijit Version: 1.1.0
Severity: minor Keywords:
Cc:

Description

InlineEditBox? will convert a typed " (quote) character into a " entity, but does not perform the reverse (convert a " entity into a " char) on editor creation.

save: function() has code to replace " with " edit: function() does not handle "/"

Change History

Changed 7 months ago by bill

  • status changed from new to closed
  • resolution set to worksforme
  • summary changed from InlineEditBox does not replace " with " on editor creation to InlineEditBox: does not replace " with " on editor creation

I tried modifying test_InlineEditBox.html to say

Bob "King of Refrigerators" Vance

instead of

Bob Vance

and it worked fine on IE6, FF3, and Safari 3.1. I'm going to close this as "works for me" but if you have a test case that fails reopen the bug and attach the test case using the Attach File button.

Changed 7 months ago by guest

  • status changed from closed to reopened
  • resolution deleted

On the latest nightly on archive.dojotoolkit.org if I type

Bob "King of Refrigerators" Vance

into any of the inline edit boxes, then click somewhere else (so the InlineEditBox? writes the changes back to the dom), then click in the editor to edit again it has " entities instead of " characters.

In the InlineEditBox?.js file. Line 134 (in the _edit function): this.value.replace(/\s*\r?\n\s*/g,"").replace(/<br\/?>/gi,"\n").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&"));

should be: this.value.replace(/\s*\r?\n\s*/g,"").replace(/<br\/?>/gi,"\n").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&").replace(/&quot;/g,"\""));

Compared with line 209 (in the save function) where it replaces " with &quot;

Tested this to fail in FF2

Changed 7 months ago by bill

  • status changed from reopened to new
  • owner set to bill

Ah I see. OK, will fix.

Changed 7 months ago by bill

  • status changed from new to closed
  • resolution set to fixed

(In [13747]) Fix problem where you type a quote in the edit mode, then save, then edit again... quote shows up as &quot in editor.

Fixes #6592. !strict

Changed 4 months ago by bill

  • milestone set to 1.2

marking tickets closed in the last three months w/blank milestone to milestone 1.2.

Note: See TracTickets for help on using tickets.