Opened 16 years ago
Closed 13 years ago
#4114 closed defect (duplicate)
rendering of included html does not work
Reported by: | Owned by: | Noah Kantrowitz | |
---|---|---|---|
Priority: | normal | Component: | IncludeMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description (last modified by )
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 16 years ago by
comment:2 Changed 16 years ago by
Cc: | Eli Heady added; anonymous removed |
---|
comment:3 Changed 16 years ago by
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 16 years ago by
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:
{{{ #!html <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)
--eli
comment:5 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
I haven't found a solution yet, but closing this since it's a duplicate of #1454.
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 <, etc). Also, the included html is wrapped in <pre></pre>
btw, in trac.ini:
Martin: have you tried altering render_unsafe_content in trac.ini?