mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user