Modify

Opened 11 years ago

Last modified 4 years ago

#1454 assigned defect

text/html fails from source: link

Reported by: anonymous Owned by: Ryan J Ollos
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 11 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 10 years ago by anonymous

Priority: normalhigh

comment:3 Changed 9 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 8 years ago by anonymous

Bump

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

comment:5 Changed 7 years ago by Miguel

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 6 years ago by Ryan J Ollos

#4114 closed as a duplicate.

comment:7 Changed 5 years ago by Ryan J Ollos

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 4 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Ryan J Ollos
Status: newassigned

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Ryan J Ollos.

Add Comment


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

 
Note: See TracTickets for help on using tickets.