| Title | TemplateManager RESOURCE-STYLESHEET nok |
| Date | 25-Mar-2006 13:06:17 EET |
| Version | v2.3.81 |
| Submitter | Dirk Frederickx |
| Bug criticality | LightBug |
| Browser version | safari |
| Bug status | ClosedBug |
| PageProvider used | |
| Servlet Container | tomcat |
| Operating System | |
| URL | |
| Java version | 1.4.2 |
I am writing a plugin which needs to include an additional css stylesheet. Unfortunately, the jspwiki rendered html is incorrect :
File: com.ecrid.jspwiki.ui.TemplateManager.java
}
else if( type == RESOURCE_STYLESHEET )
{
resourceString = "<link rel='stylesheet' type='text/css' src='"+path+"' />";
}
should become
}
else if( type == RESOURCE_STYLESHEET )
{
resourceString = "<link rel='stylesheet' type='text/css' href='"+path+"' />";
}
BTW, I would be happy to use an extra addResourceRequest type "RESOURCE_CSSINCLUDE" which would allow a plugin to insert inline css in the header of the page. ( similar to JSFUNCTION ) This should render as
<style type='text/css' >...</style>My plugin is currently inserting the inline css inside the body of the page, which seems to work fine, but this breaks the xhtml compliance of the page.
tx --DF
Good idea, and easily implemented. I fixed this bug and added your new request type (RESOURCE_INLINECSS) to 2.3.90.
Thanks ! --DF