On 16 November 2015 at 07:49, K. "pestophagous" Heller <[email protected]> wrote: > On Sun, Nov 15, 2015 at 12:43 PM, Lubomir I. Ivanov <[email protected]> > wrote: >> On 15 November 2015 at 10:24, Stefan Fuchs <[email protected]> wrote: > > Lubomir mentioned (see [1]) that currently the notes HTML looks bad > when inserted into the Grantlee template. I have an idea about that. > > I noticed a problem with the html tags that get strung together in > add_plan_to_notes. > > When "verbatim dive plan" is on (checkbox checked), there will be a > close-table "</table>" tag without a matching open-table tag. The > problem code is marked with a comment here: > https://github.com/pestophagous/subsurface/commit/f19d22ee3d712a7a598c1ec73e3f8162dbc1df65 > > That orphaned </table> tag does not seem to cause any trouble in the > Notes panel in the GUI, but I can imagine that it might wreak havoc > when that </table> is nested into the middle of the *outer* table of > the printer html template. >
yes, a closed tag without an opening tag isn't exactly valid HTML according to W3C (i've just double checked that). but it shouldn't cause much of a problem in most parsers. nesting tables should be fine, in general. the issue with fully-styled HTML in the planner notes is caused by something else. it seems as if the notes styles completely override the printing template font style and also the parent table cell (i.e. the template one) get's messed up. i decided to ignore the fully-styled HTML formatting in the notes for now and only support the <br> tag. if someone wants to find the real cause, please look at qthelper.cpp::Dive::put_notes() and printing_templates/*.html. lubomir -- _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
