Modify

Opened 7 years ago

Last modified 7 months ago

#1454 assigned defect

text/html fails from source: link

Reported by: anonymous Owned by: rjollos
Priority: high Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

The following code renders the raw text, rather than the HTML of the file listed:

[[Include(source:trunk/some_file.html, text/html)]]

Attachments (0)

Change History (8)

comment:1 Changed 7 years ago by anonymous

The work-around, of course, is to use

[[Include(http://trac-server/browser/trunk/some_file.html?format=raw)]]

Still, it would be nice to have this work through the source: reference because such a reference need not change even if the URL of the Trac server does change.

comment:2 Changed 7 years ago by anonymous

  • Priority changed from normal to high

comment:3 Changed 5 years ago by beaty.mccloud@…

Bump to this.

I was able to use the workaround, but when setting this up for additional users, it is preferred that they can just enter the file to use from the repository.

comment:4 Changed 4 years ago by anonymous

Bump

Workaround won't work for me, since our wiki pages require login.

comment:5 Changed 4 years ago by wild_oscar

The workaround does not work if you need to login to view the sources and is not ideal.

The code that would probably need changing is located at

http://trac-hacks.org/browser/includemacro/0.11/includemacro/macros.py#L76

comment:6 Changed 2 years ago by rjollos

#4114 closed as a duplicate.

comment:7 Changed 2 years ago by rjollos

I read the following somewhere recently, and copied it into my notes for use in investigating a solution to this ticket: If you want to ensure that an HTML document gets syntax highlighted and not rendered, use the text/xml mimetype. I think it came from the Trac help documentation.

comment:8 Changed 7 months ago by rjollos

  • Owner changed from coderanger to rjollos
  • Status changed from new to assigned

Add Comment

Modify Ticket

Action
as assigned .
Author


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

 
Note: See TracTickets for help on using tickets.