View Ticket
Not logged in
Ticket UUID: 3e6775edfe5ece6ec0159a8f2fb2b250b87f43fa
Title: Can't pass html comments through wiki.
Status: Open Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Open
Last Modified: 2009-05-30 15:24:38
Version Found In: [d63f87c003] 2009-03-22 13:44:43
Description & Comments:
I can't get the html <!-- comments --> through the wiki parser.

Why is this important?

  1. Modifications to some documents are required to have copyright notices included in any derived work.
  1. Converting current html documentation to wiki format would be easier if I didn't have to strip out comments.

The security issue could be avoided by converting everything within the comments to safe html but leaving the comment tags themselves.


anonymous claiming to be kkinnell added on 2009-05-27 15:46:17:
Actually, I had added an 'annotate' tag in the kkinnell-exp branch. What it did was to strip out the text between the opening and closing tags. Completely strip it out, so that a "view source" from the browser wouldn't see it.

That was perhaps a bit of creeping featurism (as Richard pointed out at the time) and I was going to make html tags work instead, but I thought someone beat me to it.

If not, the code in that branch is a decent start--take a look at what was added for the annotate tag and treat the text recognized between start and end comment tags the same way. It's recognizing the comment tags that's the hard part. <!-- and --> are asymmetrical (and not orthogonal w/ respect to the rest of html) and parsing them may lead to grief, madness, and atonal music.

Or you could wait until I shake loose at work and have some time to work on it again.


robert added on 2009-05-30 15:24:38:
Yes, I saw your code, but one of my main wishes was to make it easier to convert existing html documentation to wiki format, your solution does not do this as I would have to parse the code and wrap the comments in 'annotate' tags. In addition I wanted the comments to be passed to the browser as one of the main uses was to include copyright/license info.

< !-- -- > is standard html/xml markup, so if its madness the whole world is mad :) Why add a new markup when an existing markup already exists? I'm not sure how asymmetry/orthogonality is relevant. Also recognizing comments does not seem to be all that difficult.

I've put a prototype of my own pass-comments code in the robert-exp branch. This branch can be seen working live at JavaScriptShell.