Fossil

View Ticket
Login

View Ticket

2012-12-21
08:55 Ticket [3e6775edfe] Can't pass html comments through wiki. status still Open with 4 other changes ... (artifact: a2a3458b17 user: anonymous)
2011-09-08
23:14 Closed ticket [7cb0e01aab]: "<!--" in .wiki files is translated to visible code plus 2 other changes ... (artifact: 86caf6594c user: dmitry)
2011-04-28
10:35 Ticket [3e6775edfe] Can't pass html comments through wiki. status still Open with 1 other change ... (artifact: c341fa81c2 user: viriketo)
2009-05-30
15:24 Ticket [3e6775edfe]: 1 change ... (artifact: 4b97608f7a user: robert)
2009-05-27
15:46 Ticket [3e6775edfe]: 2 changes ... (artifact: 5c57d6d427 user: anonymous)
2009-04-24
12:24 New ticket [3e6775edfe]. ... (artifact: 1dbd133656 user: anonymous)

Ticket Hash: 3e6775edfe5ece6ec0159a8f2fb2b250b87f43fa
Title: Can't pass html comments through wiki.
Status: Open Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Open
Last Modified: 2012-12-21 08:55:59
Version Found In: [d63f87c003] 2009-03-22 13:44:43
Description:
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.


viriketo added on 2011-04-28 10:35:11 UTC:
I'd like something that lets me type text on wiki pages that will not appear in the rendered browser windows.

I don't mind a solution that is not <!-- -->, but the easier it is to type, the better. I want it to keep comments on the information of the page, that I'd read only reading wiki file source.

User Comments:
nobody (claiming to be J Esteves) added on 2012-12-21 08:55:59:
For those editing embedded documentation .wiki files with emacs, comments are also useful to specify file variables. Not sure if other editing tools make a similar use of comments, but surprised this issue persists anyway.