Opened 8 years ago

Closed 5 years ago

#4114 closed defect (duplicate)

rendering of included html does not work

Reported by: martin.jung@… Owned by: Noah Kantrowitz
Priority: normal Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (last modified by Ryan J Ollos)

As described in #1454 the rendering of included html does not work but the html source is displayed instead.

Maybe I am missing something, but I tried quite a few combinations of html input and Include syntax, e.g. [[Include(source:/trunk/test.html, text/html)]] or [[Include(source:/trunk/test.html)]]. The workaround [[Include(http://trac-server/browser/trunk/test.html?format=raw)]] also shows the html source only.

However, if whole other wiki pages are included, they are rendered correctly...

Thanks for cleaning up misunderstandings or fixing the issues.

And of course, thanks for the handy plugin :)

Attachments (0)

Change History (5)

comment:1 Changed 8 years ago by Eli Heady

I'm experiencing the same issue (trac 0.11 and 0.11.2, IncludeMacro 2.1).

I've tried the following


html is converted (< becomes &lt, etc). Also, the included html is wrapped in <pre></pre>

btw, in trac.ini:

render_unsafe_content = true

Martin: have you tried altering render_unsafe_content in trac.ini?

comment:2 Changed 8 years ago by Eli Heady

Cc: Eli Heady added; anonymous removed

comment:3 Changed 8 years ago by anonymous

To add some environment data: I am using Trac 0.11.1 and IncludeMacro 2.1

I have tried the following combinations

[[Include(source:trunk/test.html, text/html)]]
[[Include(source:trunk/test.html, None)]]
[[Include(http://server/project/browser/trunk/test.html, None)]]
[[Include(http://server/project/browser/trunk/test.html, text/html)]]

And yes, I should have stated that before: all the render_unsafe_content are set to true (wiki, browser, attachment).

Still, all html code is escaped and enclosed in div and pre as described by eli.

comment:4 Changed 8 years ago by anonymous

Cc: anonymous added; Eli Heady removed

Here's a not ideal workaround.

Set the mimetype of the included page to text/x-trac-wiki, and edit the included page to utilize the #!html wikiprocessor.

Example in a trac wiki page (where the included html should appear:

[[Include(http://someurl.html, text/x-trac-wiki)]]

someurl.html contents:

<h1>My html to include</h1>

This only works, of course, if you can alter the html to be included, and it make your souce html somewhat unsuitable for other purposes (ie, rendering directly in a browser)


comment:5 Changed 5 years ago by Ryan J Ollos

Description: modified (diff)
Resolution: duplicate
Status: newclosed

I haven't found a solution yet, but closing this since it's a duplicate of #1454.

Modify Ticket

as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.