Ticket #5580 (closed defect: fixed)
InlineEditbox renderAsHtml logical error when set to true using textareas
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.1 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | inlineeditbox renderashtml |
| Cc: |
Description (last modified by bill) (diff)
In InlineEditBox?.js at line 129 the renderAsHtml flag is used to determine whether to replace characters for wrapping and such. The line looks like this:
var editValue = (this.renderAsHtml ? this.value : this.value.replace(/s* ? s*/g,"").replace(/<br/?>/gi, " ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&"));
It appears to me that the true and false statements are in reverse order. The replacement characters occur if this.renderAsHtml == false when I believe the intent was to replace them if renderAsHtml is set to true. This causes textareas to destroy data in textareas wrapped in InlineEditBoxes?, as well as display them improperly.