Update the Tika-powered .docx -> html converter to re-write the img src urls from embedded ones to repo-expanded ones

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22546 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-09-15 11:04:14 +00:00
parent 896138e17c
commit 1311f124b6
2 changed files with 152 additions and 17 deletions

View File

@@ -315,11 +315,20 @@ public class HTMLRenderingEngineTest extends BaseAlfrescoSpringTest
String html = reader.getContentString();
assertEquals("<?xml", html.substring(0, 5));
if(name.endsWith(".docx")) {
// Check that the html has the img tags
// assertEquals(
// "Couldn't find img tag in html:\n" + html,
// true, html.contains("<img")
// );
assertEquals(
"Couldn't find img tag in html:\n" + html,
true, html.contains("<img")
);
// Check that it has the right img src
String expSource = "src=\""+ baseName + "_files" + "/image";
assertEquals(
"Couldn't find correct img src in html:\n" + expSource + "\n" + html,
true, html.contains(expSource)
);
}
// Check we got an image folder
int numItems = nodeService.getChildAssocs(targetFolder).size();