While working on the Catalog Base Form for DBXL, I nearly went nuts trying to debug why my <link> tags were not working in the task pane. I had the file included as a form resource file, and when I opened the HTML file directly from Internet Explorer, everything was rendered correctly. However, when InfoPath wrapped everything up into an XSN on publish, it simply broke! After talking with a few colleagues and noting that they were having the same problem, I decided to e-mail my contacts at Microsoft.
It turns out that this is indeed a bug, but not exactly in InfoPath. InfoPath takes advantage of the Internet Explorer engine to render all of its HTML. So, if you have are running Internet Explorer 7 and have updated it within the past month or so, you will be able to reproduce this bug.
A KB article along with an IE hotfix are in the works to resolve this issue, but I do not know when they will be complete. As soon as I hear, I will post it up!
Here are the specific reproduction steps if you would like to try this out for yourself.
- Open a text editor, and then paste this code into a new file.
<html>
<head>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
This should be red.
</body>
</html>
- Save the file as taskpane.htm
- Open a text editor, and then paste this code into a new file.
body
{
color: red;
}
- Save the file as style.css, in the same folder as taskpane.htm
- Open Internet Explorer.
- From the File Menu, select Open, browse to the taskpane.htm file, and click Open
Note: File is opened and text is displayed as red.
- Open InfoPath and choose to design a new blank form.
- From the Tools menu, select Form Options.
- On the Advanced tab, select to enable the custom task pane, and then click Resource Files.
- Add the taskpane.htm and style.css files as Resource Files.
- Select taskpane.htm as the task pane location, and type test for the task pane name.
- Preview the form.
Result: Task pane is displayed with black text.
Expected: The text should be red.