Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#6508 closed enhancement (fixed)

Possible to write HTML comments into wiki pages?

Reported by: quinn@… Owned by: Remy Blank
Priority: low Milestone: 0.12
Component: wiki system Version: 0.10.4
Severity: minor Keywords: patch
Cc: Branch:
Release Notes:
API Changes:
Internal 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 (1)

6508-htmlcomment-processor.patch (2.5 KB ) - added by Remy Blank 16 years ago.
Patch against trunk adding a htmlcomment wiki processor

Download all attachments as: .zip

Change History (10)

comment:1 by Christian Boos, 16 years ago

Keywords: verify added
Milestone: 0.11.1
Severity: trivialnormal

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

comment:2 by quinn@…, 16 years ago

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

comment:3 by Christian Boos, 16 years ago

Keywords: verify removed
Milestone: 0.11.20.12
Severity: normalminor

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 by Noah Kantrowitz, 16 years ago

Seems like a good case for a CC license macro.

by Remy Blank, 16 years ago

Patch against trunk adding a htmlcomment wiki processor

comment:5 by Remy Blank, 16 years ago

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 ; comment:6 by Christian Boos, 16 years ago

Owner: changed from Christian Boos to Remy Blank

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 ; comment:7 by anonymous, 16 years ago

Resolution: fixed
Status: newclosed

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 ; comment:8 by Christian Boos, 16 years ago

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 comment:9 by Remy Blank, 16 years ago

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 ;-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.