Ticket #1928426 (closed defect)

Reporter


sfbugs
Opened: 03/29/08
Last modified: 03/29/08
Status: closed
Type: defect
Resolution: Fixed

Owner


Dav Glass
Target Release:
Priority: P3 (normal)
Summary: filter_invalid_lists
Description:

the function filter_invalid_lists in editor seems work incorrectly, every time I got the final generated HTML, ul and ol tag are attached one redundant li tag.

Type: defect Observed in Version: None
Component: Editor Severity: S3 (normal)
Assigned To: Dav Glass Target Release:
Location: Priority: P3 (normal)
Tags: Relates To:
Browsers:
URL:
Test Information:

Change History

realazy

  • Username: realazy
Posted: 03/29/08

that's my patch:

YAHOO.widget.SimpleEditor.prototype.filter_invalid_lists = function(html){
html = html.replace(/</li>n/gi, '</li>');

html = html.replace(/</li><ol>/gi, '</li><li><ol>');
html = html.replace(/</ol>/gi, '</ol></li>');
html = html.replace(/</ol></li>n?/gi, "</ol>n");

html = html.replace(/</li><ul>/gi, '</li><li><ul>');
html = html.replace(/</ul>/gi, '</ul></li>');
html = html.replace(/</ul></li>n?/gi, "</ul>n");

html = html.replace(/</li>/gi, "</li>n");
html = html.replace(/</ol>/gi, "</ol>n");
html = html.replace(/<ol>/gi, "<ol>n");
html = html.replace(/<ul>/gi, "<ul>n");
return html;
}

George

YUI Developer

Posted: 03/31/08
  • summary changed from filter_invalid_lists to [#1844215] filter_invalid_lists

This bug report is being forwarded to the author or current owner of the affected component for additional investigation and response.

nobody

  • Username: nobody
Posted: 07/22/08

Here is another way to work around this bug, which avoids the overhead of excess nesting:

this.Editor.filter_invalid_lists = function(html) {
html = html.replace(/</li>n/gi, '</li>');

html = html.replace(/</li><([ou]l)>/gi, '<$1>');
html = html.replace(/</([ou]l)>/gi, '</$1></li>');
html = html.replace(/</([ou]l)></li>n/gi, "</$1>n");

html = html.replace(/</li>/gi, "</li>n");
html = html.replace(/</([ou]l)>/gi, "</$1>n");
html = html.replace(/<([ou]l)>(?=<([ou]l)>)/gi, "<$1><li>n");
html = html.replace(/<([ou]l)>/gi, "<$1>n");
html = html.replace(/(</[ou]l>)</li>(?!</?([ou]l|li)>)/gi, "$1n");
return html;
}

mlennox_ammado

  • Username: mlennox_ammado
Posted: 07/28/08

Has there been any movement on this bug? Will it be included in the next release of YUI?

George

YUI Developer

Posted: 09/10/08

This issue has been resolved. The fix will be included in the next YUI update. A comment will be added to this bug to notify you when the release is posted and the fix is available for your use.

George

YUI Developer

Posted: 10/2/08

The fix for this issue had been posted today as part of the YUI 2.6.0 release.

The status of this bug has been set to "pending". The bug will automatically close in two weeks if there is no additional comments posted to the bug. Therefore, if you integrate the latest sources into your build and verify the fix is working, no additional action need be taken.

However, if you update to YUI 2.6.0 and you are still seeing a problem, please do the following

- add a comment to the bug stating the regression failed and include any details that may be unique to 2.6.0
- attach any updated sample code necessary for us to reproduce the issue

By updating the bug as stated above, the Status will reset to open and we will re-investigate the issue.

sf-robot

  • Username: sf-robot
Posted: 10/17/08
  • status changed from assigned to closed

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

sfbugs

Posted: 01/7/09

This ticket was imported from Source Forge.

Orginially submitted by: nobody