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

michaelböckling
Champ in-the-making
Champ in-the-making
Just to make sure: did you try to click the download link in the doc details view without the "save as"? This is actually important.

In Share, clicking directly on Download or View in Browser I get same filtered node (knowing that in repository, my node remains with my html styles…).

michaelböckling
Champ in-the-making
Champ in-the-making
I still have a hard time believing it Smiley Happy
Can you upload a screencast of you downloading and opening the html?

No video, but behavior confirmed with Chromium and Firefox, using single click "Download"…..
(or curl direct call to http://localhost:8080/share/proxy/alfresco/api/node/content/workspace/SpacesStore/bf4026e0-cbb7-4ee8... …)

Actually, it's funny to see that the share application html content filter does filter "<script>" and "style=", but not "height=" or "width=".
Difficult to believe there are no logic behind…

Example, in Affresco Explorer, I create a new node, in PLAIN/TEXT

Some text here<br />
<script type="text/javascript">
function d() { alert("d"); }
</script>
<br /> <a href="" onclick="d()">script example</a>



/alfresco/d/d/workspace/SpacesStore/bf4026e0-cbb7-4ee8-ac12-f89d37c0ce34/test.html
/share/proxy/alfresco/api/node/content/workspace/SpacesStore/bf4026e0-cbb7-4ee8-ac12-f89d37c0ce34/test.html
Both present the same untouched content.

Still in Alfresco Explorer, I change the MIME type, and put it to HTML,
The content remain the same calling /alfresco/d/d/workspace/SpacesStore/bf4026e0-cbb7-4ee8-ac12-f89d37c0ce34/test.html
But the content is filtered with /share/proxy/alfresco/api/node/content/workspace/SpacesStore/bf4026e0-cbb7-4ee8-ac12-f89d37c0ce34/test.html

Some text here<BR />

<BR /> <A href="">script example</a>


Share does definitively filter html contents !

Regards.

fliot
Champ in-the-making
Champ in-the-making