Modify

Opened 17 years ago

Last modified 4 years ago

#1454 new defect

text/html fails from source: link

Reported by: anonymous Owned by:
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 (9)

comment:1 Changed 17 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 16 years ago by anonymous

Priority: normalhigh

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

Bump

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

comment:5 Changed 13 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

Version 0, edited 13 years ago by Miguel (next)

comment:6 Changed 12 years ago by Ryan J Ollos

#4114 closed as a duplicate.

comment:7 Changed 12 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 10 years ago by Ryan J Ollos

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

comment:9 Changed 4 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted
Status: assignednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.