Edgewall Software
Modify

Ticket #6508 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years 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:
Release Notes:
API Changes:

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 years ago.
Patch against trunk adding a htmlcomment wiki processor

Download all attachments as: .zip

Change History

comment:1 Changed 4 years ago by cboos

  • Keywords verify added
  • Milestone set to 0.11.1
  • Severity changed from trivial to normal

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

comment:2 Changed 4 years ago by quinn@…

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

comment:3 Changed 4 years ago by cboos

  • Keywords verify removed
  • Milestone changed from 0.11.2 to 0.12
  • Severity changed from normal to minor

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?

comment:4 Changed 4 years ago by nkantrowitz

Seems like a good case for a CC license macro.

Changed 3 years ago by rblank

Patch against trunk adding a htmlcomment wiki processor

comment:5 follow-up: Changed 3 years 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.

comment:6 in reply to: ↑ 5 ; follow-up: Changed 3 years 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).

comment:7 in reply to: ↑ 6 ; follow-up: Changed 3 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

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?

comment:8 in reply to: ↑ 7 ; follow-up: Changed 3 years 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.

comment:9 in reply to: ↑ 8 Changed 3 years 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 ;-)

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from rblank. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.