mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-13 16:34:52 +09:00
issue 1292: The bug was fixed "incorrectly" in Rev10383. And due to the fix, it was having problems with contents such as "<A><A></A><SPAN></SPAN></A>". The problematic fix is rolled-back and the issue 1292 is fixed in a different manner. (Now closing tags for unary tags such as EMBED are simply removed)
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10736 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
262928157c
commit
8b35151990
1 changed files with 10 additions and 10 deletions
|
|
@ -5215,21 +5215,21 @@ xe.XE_XHTMLFormatter = $.Class({
|
|||
} else {
|
||||
var tags = [], t = '';
|
||||
|
||||
// remove unnecessary closing tag
|
||||
// if the tag does not require a closing tag, simply remove the closing tag
|
||||
if ($.inArray(tag,lonely_tags) >= 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// if the matching opening tag was not found, remove this closing tag
|
||||
if (!stack.length){
|
||||
return '';
|
||||
}
|
||||
|
||||
do {
|
||||
t = stack[stack.length-1];
|
||||
if (t.tag != tag){
|
||||
continue;
|
||||
}
|
||||
if (t.state != 'deleted'){
|
||||
tags.push('</'+t.tag+'>');
|
||||
}
|
||||
stack.pop();
|
||||
} while(stack.length && t.tag == tag);
|
||||
t = stack.pop();
|
||||
if (t.tag != tag) continue;
|
||||
if (t.state != 'deleted') tags.push('</'+t.tag+'>');
|
||||
} while(stack.length && t.tag != tag);
|
||||
|
||||
return tags.join('');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue