"one dive" printout - not correct HTML interpretion for dive from planner

Lubomir I. Ivanov neolit123 at gmail.com
Mon Nov 16 02:12:11 PST 2015


On 16 November 2015 at 07:49, K. "pestophagous" Heller
<pestophagous at gmail.com> wrote:
> On Sun, Nov 15, 2015 at 12:43 PM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
>> On 15 November 2015 at 10:24, Stefan Fuchs <sfuchs at gmx.de> 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
--


More information about the subsurface mailing list