cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable HTML content Filter ?

fliot
Champ in-the-making
Champ in-the-making
Hi,

In Share,
I upload a file "doc.html"

<p>
qsdqsd
<img alt="" src="/webapp/proxy/alfresco/api/node/content/workspace/SpacesStore/26d578d9-0322-4dc2-972f-62f9c8e5f4a8/smart-phone-shopping.jpg" style="height: 80px; width: 100px;" /> qsdqs dq sdq </p>


Dowloading it immediatelly, the file have lost image style

<p>
qsdqsd
<img alt="" src="/webapp/proxy/alfresco/api/node/content/workspace/SpacesStore/26d578d9-0322-4dc2-972f-62f9c8e5f4a8/smart-phone-shopping.jpg" /> qsdqs dq sdq </p>


Is it possible to avoid such filtering, and to store what I simply upload ?

Thanks in advance.
14 REPLIES 14

mitpatoliya
Star Collaborator
Star Collaborator
Strange I do not think Alfresco do such filtering.
In fact I have tried the same thing but could not replicate your problem.

fliot
Champ in-the-making
Champ in-the-making
Strange…
I do reproduce it on 4.0.e and on 4.2.c
In Share upload a simple html file, with the pasted above content, and styles aren't kept within the stored node.

Regards.

michaelböckling
Champ in-the-making
Champ in-the-making
To my knowledge Alfresco doesn't filter uploaded content. Can you try to save the uploaded HTML with right-click "save as"? It could be that your browser is changing the DOM.

Best regards,
Michael

30 seconds screencam with alfresco 4.2.c

https://docs.google.com/file/d/0B6idEMRjO2ECcktHbjA0QlhpMlE/edit?usp=sharing

No custom behavior or hidden script…
This is the real default.

michaelböckling
Champ in-the-making
Champ in-the-making
For some reason the video won't load. Smiley Sad
I just tried this myself, and when I open the file in the browser, I can reproduce your problem. However, when I click the "download" link and save the file to disk first, it is the same as the one that I uploaded when I open it.

Cheers,
Michael

michaelböckling
Champ in-the-making
Champ in-the-making
Now the video loads, and I noticed you did something similar. What happens when you go into the doc details and then click on "download" without doing the "save link as"? If its fine then this is a browser issue.

Cheers,
Michael

I do not believe it would be a browser issue,
I got it with Chromium and with Firefox, enabling flash or not client side..

I also tried enabling/disabling flash upload component in share and same behavior.

michaelböckling
Champ in-the-making
Champ in-the-making
This is easy to find out.
1) Open the Node Browser: http://localhost:8080/alfresco/faces/jsp/admin/node-browser.jsp
2) Enter the NodeRef of your document (the part in the document details after ?nodeRef=) and search (make sure Search is set to "NodeRef" on the left side)
3) check if the size in the "{http://www.alfresco.org/model/content/1.0}content" property matches what you uploaded (search for |size=)

If the size is correct, Alfresco stores the binary as it should. You can also download directly from the repo browser.

4) Now, click straight "download" in the document details view and check again.

What do you get?

Best regards,
Michael

Impressivelly fun, thanks for your interest 🙂

The stored node :
/alfresco/d/d/workspace/SpacesStore/a0f6d0f8-f99c-46db-8f2c-e77c4b587b0e/test.html
Does contain the "style" html code.

But getting it though share, it returns filtred content,
/share/proxy/alfresco/api/node/content/workspace/SpacesStore/a0f6d0f8-f99c-46db-8f2c-e77c4b587b0e/test.html

Is there a way to change this, not so natural, behavior ?
Some idea ?