aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs
diff options
context:
space:
mode:
authorhttp://smcv.pseudorandom.co.uk/ <smcv@web>2013-02-24 09:37:37 -0400
committeradmin <admin@branchable.com>2013-02-24 09:37:37 -0400
commit69e7323992a5f281833af3aaf471fe47f30b0ed6 (patch)
tree860a81902359c287375829f7345f0ad0d605de71 /doc/bugs
parent5a6d33598cb676a2a1a9937b1f28573d071dca99 (diff)
downloadikiwiki-69e7323992a5f281833af3aaf471fe47f30b0ed6.tar
ikiwiki-69e7323992a5f281833af3aaf471fe47f30b0ed6.tar.gz
bug report + branch with fix and regression test
Diffstat (limited to 'doc/bugs')
-rw-r--r--doc/bugs/map_generates_malformed_HTML.mdwn33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/bugs/map_generates_malformed_HTML.mdwn b/doc/bugs/map_generates_malformed_HTML.mdwn
new file mode 100644
index 000000000..d47d066a8
--- /dev/null
+++ b/doc/bugs/map_generates_malformed_HTML.mdwn
@@ -0,0 +1,33 @@
+[[!template id=gitbranch branch=smcv/ready/map author="[[Simon McVittie|smcv]]"]]
+
+`\[[!map]]` can generate bad HTML with unbalanced open/close tags
+(in XML terms: "not well-formed") in certain situations. This
+appears to be a regression caused by fixing
+[[maps with nested directories sometimes make ugly lists]], which
+suppressed some redundant `</ul><ul>` pairs, but appears not to
+have the ideal logic for this, leading to malformed HTML.
+
+In particular, on a site with these pages:
+
+* alpha
+ * 1
+ * i
+ * ii
+ * iii
+ * iv
+ * 2
+ * a
+ * b
+ * 3
+* beta
+
+the maps "alpha/1 or beta", "alpha/1/i* or alpha/2/a or beta" and
+"alpha/1/i* or alpha/2/a" have malformed HTML.
+
+My `ready/map` branch adds a regression test and makes it pass.
+
+The fix is not particularly elegant - it generates the previous
+HTML with redundant `</ul><ul>` pairs, marks the redundant
+pairs, and edits them out afterwards - but it works. If anyone can come
+up with a cleaner algorithm that avoids generating the redundant tags
+in the first place, that would be even better. --[[smcv]]