On Wed, Jun 17, 2015 at 5:13 PM, Dirk Hohndel <[email protected]> wrote:

> Hey Gehad,
>
> I know you are focused on this year's GSoC project right now, but I have a
> question about your previous contribution, the HTML exporter...
>
> For me (Firefox 38.0.5, Arch Linux) the expansion by clicking on an entry
> in the dive list doesn't work. I get nothing at all. The Expand All button
> works.
>
> This is what I see in source view:
>
> <ul id="290" ul="<=" onclick="toggleExpantion(event, this)"
> style="padding: 2px 10px;">
>
> What I don't understand about this line is the ul attribute. It doesn't
> appear to exist based on my reading of the standard and when I ask Firefox
> to copy the html what it does seems to indicate that it might be confused
> by that ul attribute as well:
>
> <ul style="padding: 2px 10px;" id="290" onclick="toggleExpantion(event,
> this)" <="" ul="">
>
> see how it creates a '<' attribute here?
>
> Something is definitely wrong there.
>
> Any idea?
>

Hello Dirk,

I couldn't reproduce this on Chromium but I still see the malformed Html it
seems that Chromium is more tolerant to incorrect tags, I have attached a
patch that fixes the tag closing, I hope this will fix the problem.


-- 
regards,

Gehad
From 87d9285e20ed2ea07e5474e19d440f291c03ffbc Mon Sep 17 00:00:00 2001
From: Gehad elrobey <[email protected]>
Date: Wed, 17 Jun 2015 17:53:51 +0200
Subject: [PATCH] HTML: fix the unclosed <ul> tag.

The <ul> tag must be closed as defined by the html specs.

Signed-off-by: Gehad elrobey <[email protected]>
---
 theme/list_lib.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/theme/list_lib.js b/theme/list_lib.js
index 6ca82ea..a2a50f8 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -47,7 +47,7 @@ function updateView(start, end)
 	var divelist = document.getElementById('diveslist');
 	divelist.innerHTML = "";
 	for (var i = start; i <= end; i++) {
-		divelist.innerHTML += '<ul id="' + itemsToShow[i] + '" onclick="toggleExpantion(event, this)"</ul>';
+		divelist.innerHTML += '<ul id="' + itemsToShow[i] + '" onclick="toggleExpantion(event, this)"></ul>';
 		expand(document.getElementById(itemsToShow[i]));
 		items[itemsToShow[i]].expanded = true;
 	};
@@ -63,7 +63,7 @@ function addHTML(indexes)
 	var divelist = document.getElementById('diveslist');
 	divelist.innerHTML = "";
 	for (var i = 0; i < indexes.length; i++) {
-		divelist.innerHTML += '<ul id="' + indexes[i] + '" onclick="toggleExpantion(event, this)"</ul>';
+		divelist.innerHTML += '<ul id="' + indexes[i] + '" onclick="toggleExpantion(event, this)"></ul>';
 		expand(document.getElementById(indexes[i]));
 		itemsToShow[indexes[i]].expanded = true;
 	};
-- 
2.4.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to