hancypipl / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

Regression resolving stylesheets relative to docroot #262

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an HTML file containing a relative stylesheet link element, e.g. 
<link href="help.css" rel="stylesheet" type="text/css"/>

2. Obtain a docRoot URL string pointing into the classpath
URL docRootUrl = SomeClass.class.getResource("/help");
if(docRootUrl != null)
{
    docRoot = docRootUrl.toString() + "/";
}

3. Call setDocumentFromString(yourXHtmlString, docRoot, new 
XhtmlNamespaceHandler()) on an instance of XHTMLPanel where yourXHtmlString 
contains the content of the file created in 1.

What is the expected output? What do you see instead?
The page should be rendered with the stylesheet loaded from the classpath but 
is instead rendered without style.

What version of the product are you using? On what operating system?
This used to work with 9.0.4 and 9.0.6 but is failing with 9.0.7.
Tested on OS X 10.10.3.

Please provide any additional information below.
I only checked stylesheets but it's very well possible that this is a general 
issue concerning docroot handling.

Original issue reported on code.google.com by jhuxh...@googlemail.com on 7 May 2015 at 9:57

GoogleCodeExporter commented 9 years ago
I hope this is still the correct issue tracker...

Original comment by jhuxh...@googlemail.com on 7 May 2015 at 9:58