Edgewall Software

Ticket #6508 (closed enhancement: fixed)

Opened 11 months ago

Last modified 3 months ago

Possible to write HTML comments into wiki pages?

Reported by: quinn@… Owned by: rblank
Priority: low Milestone: 0.12
Component: wiki system Version: 0.10.4
Severity: minor Keywords: patch
Cc:

Description

I'm finding that the HTML WikiProcessor strips-out comments. Is there any way to include HTML comments on a wiki page? The need is to paste in something like the machine-readable code generated by Creative Commons:

<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
   <license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
   <dc:type rdf:resource="http://purl.org/dc/dcmitype/Software" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
   <permits rdf:resource="http://web.resource.org/cc/Distribution" />
   <requires rdf:resource="http://web.resource.org/cc/Notice" />
   <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
   <requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
   <requires rdf:resource="http://web.resource.org/cc/SourceCode" />
</License>
</rdf:RDF>
-->

Attachments

6508-htmlcomment-processor.patch (2.5 KB) - added by rblank 3 months ago.
Patch against trunk adding a htmlcomment wiki processor

Change History

  Changed 8 months ago by cboos

  • keywords verify added
  • severity changed from trivial to normal
  • milestone set to 0.11.1

Have you tried with 0.11? I think this should now work.

  Changed 8 months ago by quinn@…

I have not. I look forward to its release. Cheers!

  Changed 5 months ago by cboos

  • keywords verify removed
  • severity changed from normal to minor
  • milestone changed from 0.11.2 to 0.12

here's an HTML comment (between the arrows):

→ ←

Appears to be stripped in 0.11. Maybe there could be a special htmlcomment processor for this?

  Changed 5 months ago by nkantrowitz

Seems like a good case for a CC license macro.

Changed 3 months ago by rblank

Patch against trunk adding a htmlcomment wiki processor

follow-up: ↓ 6   Changed 3 months ago by rblank

  • keywords patch added

The patch above adds a new htmlcomment wiki processor that allows embedding HTML comments, together with the relevant unit tests. Use it as follows:

{{{
#!htmlcomment
This is an HTML comment <em>with tags &amp; entities</em>.
}}}

This would generate the following block in the output:

<!--
This is an HTML comment <em>with tags &amp; entities</em>.
-->

Christian, is that what you had in mind? If so, let me know and I'll commit to trunk and update the documentation.

in reply to: ↑ 5 ; follow-up: ↓ 7   Changed 3 months ago by cboos

  • owner changed from cboos to rblank

Replying to rblank:

The patch above adds a new htmlcomment wiki processor that allows embedding HTML comments, ... Christian, is that what you had in mind?

Yes, please commit (and document as minor feature for the wiki in TracDev/ReleaseNotes/0.12).

in reply to: ↑ 6 ; follow-up: ↓ 8   Changed 3 months ago by anonymous

  • status changed from new to closed
  • resolution set to fixed

Replying to cboos:

Yes, please commit

Committed in [7509].

(and document as minor feature for the wiki in TracDev/ReleaseNotes/0.12).

...right. You're too fast :-)

Should I also add the new processor to WikiProcessors?

in reply to: ↑ 7 ; follow-up: ↓ 9   Changed 3 months ago by cboos

Replying to anonymous:

Should I also add the new processor to WikiProcessors?

Sure, and you could also add an example in WikiHtml.

in reply to: ↑ 8   Changed 3 months ago by rblank

Replying to cboos:

Replying to anonymous:

Should I also add the new processor to WikiProcessors?

Sure, and you could also add an example in WikiHtml.

Done.

And BTW: welcome back ;-)

Add/Change #6508 (Possible to write HTML comments into wiki pages?)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from rblank. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.