Menu

#1 Bad tag nesting can produce unexpected results

open
Enhancement (4)
1
2010-09-18
2008-08-04
No

Users may expect that this string:

[b]This [i]is[/b] a [/i]test.

would produce this output:

<b>This <i>is</i></b><i> a </i> test.

NBBC currently produces this output:

<b>This <i>is</i></b> a test.

In effect, this means that the "italics part" doesn't continue to the closing [/i] tag, but rather stops at the [/b]. This is not necessarily a bad thing, but rather a side-effect of the error-correction process: The tags are badly mis-nested, producing a bad document, and NBBC's solution for correcting it is not the same as what some users may expect, but may also be exactly what other users expect.

The solution for this is to allow some tag rules to be marked as "text-property tags" instead of merely as "inline" or "block" or whatever classes, so that NBBC can stop or start them any time it passes through a start tag or end tag. This is a non-trivial fix, and may not appear for several future versions, depending on demand.

Discussion

  • phantom-inker

    phantom-inker - 2010-01-10
    • assigned_to: nobody --> phantom-inker
     
  • phantom-inker

    phantom-inker - 2010-09-18
    • priority: 3 --> 1
     

Log in to post a comment.