#9 Dropping of SPAN tag

unresolved
closed-fixed
None
5
2009-05-25
2007-12-12
No

Simply HTML drops the SPAN tag from the source, for no good reason. An example:

<span class="class">Hello</span>

When the example is entered into the source editing view, I switch to the rich text view, and then back to the source editing view, the span is no longer there.

When the span has font styling like <span style="color: red"/>, it is converted into FONT tag, which is not exactly perfect.

Kafenio does not have this bug.

Discussion

  • Daniel Polansky

    Daniel Polansky - 2007-12-12
    • assigned_to: nobody --> dpolivaev
     
  • Dimitry Polivaev

    • status: open --> pending-wont-fix
     
  • Dimitry Polivaev

    Logged In: YES
    user_id=826253
    Originator: NO

    Kafenio transforms

    <span style="color: red">Hello</span>

    into

    <span> <font color="red">Hello</font></span> .

    Tag <span> is generally not supported in swing html. That's why it is removed by SimplyHTML.

    Dimitry

     
  • Daniel Polansky

    Daniel Polansky - 2007-12-14
    • status: pending-wont-fix --> open-wont-fix
     
  • Daniel Polansky

    Daniel Polansky - 2007-12-14

    Logged In: YES
    user_id=625500
    Originator: YES

    Well, Kafenio does not drop SPAN tag.

    Also, I cannot confirm that the SPAN tag is unsupported in Swing HTML. It actually works fine, at least for the several cases that I have tried. Tag SPAN works fine with:

    * The attribute CLASS, with the style of the class set in the style sheet
    * The attribute STYLE using which the style is set directly, including italics, background color, and foreground color

    Tested with JRE 1.6.0_03, Windows Vista.

    Really important in this bug report is that

    <span class="class">Hello</span>

    does not get dropped to

    Hello

    Dan

     
  • Dimitry Polivaev

    • milestone: --> unresolved
     
  • Daniel Polansky

    Daniel Polansky - 2008-02-02

    Logged In: YES
    user_id=625500
    Originator: YES

    I have provided an imperfect solution to the problem in the patch nr. 1885166. Admittedly, it does not treat <span style="color: red">Hello</span> properly. However, it treats some other cases properly, including <span class="myclass">Hello</span>, enabling the users to use clean styling techniques.

    Dan

     
  • Nobody/Anonymous

    Logged In: NO

    Span is not supported in JRE 1.4.2 and hence can not be used in programs working under it.
    Dimitry

     
  • Daniel Polansky

    Daniel Polansky - 2008-02-22

    Logged In: YES
    user_id=625500
    Originator: YES

    Hello Dimitry, the solution I have provided is enabled and disabled by a user setting, as follows from the patch. The users who are using JRE 1.4.2 are free not to use the option to have the <span> tag. The users who are using newer versions of Java should be happy to be able to use clean formatting techniques, like "<span class='class'>Hello</span>". My solution serves those users who want it while providing the freedom not to have it for those who want that SimplyHTML drops "<span class='class'>" without providing any replacement for this information. Everyone should be satisfied, both those who want it and those who don't. Dan

     
  • Daniel Polansky

    Daniel Polansky - 2009-05-25
    • status: open-wont-fix --> closed-fixed