Data Images in cm:content

cancel
Showing results for 
Search instead for 
Did you mean: 
Member II

Data Images in cm:content

Jump to solution

After upgrading Alfresco to 6.1 we have a problem displaying data images in e.g. blog posts or discussion topic.

After pasting a data image in a blog post an saving ist, the image in the post is empty, to be precise the data is removed from the src attribute of the img tag. When i have a look at the data file (.bin file in the data folder), i can see, that the img is saved correctly.

This is what we get:

Share Node Content URL:

http://XXX/share/proxy/alfresco/api/node/workspace/SpacesStore/01865511-45ed-4951-97dd-d242f453ac24/content;cm:content

Content:

<!DOCTYPE html><p>PASTE IMAGE:</p>
<p>#<img src="" alt="" />#</p>

Data File:

contentstore/2020/4/17/6/58$ vi 757fe391-d104-4ccb-a74c-2b865ea1204b.bin

Content:

<p>PASTE IMAGE:</p>
<p>#<img src="data&colon;image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAAiCAYAAAAXtSR4AAADP0lEQVRoge2Yr4/bMBTH7396yMgoKCwoKCgoLCioKMyof0BRWFGQ0bGCKWAyWXR3iiZt1YB3mjxNikZMvgO5H0mb9tK0W7fJ4Atavz77fWz569cbay3OUi3gJfK8HC8yMGb/+1p4SOQl8p+uu8d3+PTjAZ9+PODm3GSmCEEXgzUOsAjp74DVjgS0TYk8CsAZgehJjCOIchRKd3GbBbz+eE++qF/ztQ3KPELAWS+GgQcR8kJB9+eWCcgXqJ8+bxYe2Eh+Ih+i3l23xmYZD+ZhXoisbDBW4yxYg8Ksha0FfGIIcwmlTTeR0dBKQqQBglwN4mvhHzlZNYRPYGEOqTRM250UrRWkSBEEOdQRWP0cx09WjWXAwKPePEZDyRwh29m8s2CRh1y9DsqEwBfV5GRHYckExBeopi5uJqxNxsASCTM2Xgvs1jgblkwILNv8u7D0CiFFWI8YQ7+mfo2zYdXCB4Wrl7vDyASMfAjVng/LSCSM4As17d6YAcuso8H6D67xjZhJsIhob4HbMoVHBB5kKKrt+PGeAsta2G2J1CMQD5AVFbZHTsAcWLXwRk1mT3t5Z8DSWkNrsx/YblEVGUKPgYgjzEo07QxY1sLaFtuqQBZ27sbDDGUzcnJnwJIJgeICXR3HNFLjqbCm/KDd3kJEHEQBljuWPQ3WcBNuRQROhGC541IzYFULDorLWSB+C6wBGG9o9yfDetaYS82ApVfhaSbyp2B1BSaQl4A1BmGOG26XCIghvf3LYBmZgO3uYhnP21kjkTCORfUWLIsyPvacMZAJA/k51MidelFYIvaRvuyaROrHEMUGSusnF3x+ccfwiCGROxelWSMigi+q3gu9i5Gpj1gU2CgN/eSCRmsoKRB7tP+QPADLrKOuxal6HcXAVbvTRzxCLhW06cyjNRpNVWJY4xmwUiF7LmegihxRwIc9GePwDjmYtTCVQOT1erJwhcZaGFXs95jEwA/1bAdgWWtQiajXizKEq2YnRkO9uPdwrmGNp6n59h4fv3+4zL8O/7se2y+4f6wcrKn6/P0O94+VgzVV5udXB+sUOVgOloN1dTlYDpaDdXU5WA6Wg3V1OVgOloN1dTlYDpaDdXX9AuWIS1dpFeMYAAAAAElFTkSuQmCC" alt="" />#</p>

Alfresco API URL:

http://XXX/alfresco/service/api/node/workspace/SpacesStore/01865511-45ed-4951-97dd-d242f453ac24/content;cm:content

Content:

<p>PASTE IMAGE:</p>
<p>#<img src="data&colon;image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAAiCAYAAAAXtSR4AAADP0lEQVRoge2Yr4/bMBTH7396..." alt="" />#</p>

Alfresco Share URL as Attachment:

http://XXXX/share/proxy/alfresco/api/node/workspace/SpacesStore/01865511-45ed-4951-97dd-d242f453ac24/content;cm:content?a=true

Content:

<p>PASTE IMAGE:</p>
<p>#<img src="data&colon;image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAAiCAYAAAAXtSR4AAADP0lEQVRoge2Yr4/bMBTH7396yMgoKCwoKCgoLCioKMyof0BRWFGQ0bGCKWAyWXR3iiZt1YB3mjxNikZMvgO5H0mb9tK0W7fJ4Atavz77fWz569cbay3OUi3gJfK8HC8yMGb/+1p4SOQl8p+uu8d3+PTjAZ9+PODm3GSmCEEXgzUOsAjp74DVjgS0TYk8CsAZgehJjCOIchRKd3GbBbz+eE++qF/ztQ3KPELAWS+GgQcR8kJB9+eWCcgXqJ8+bxYe2Eh+Ih+i3l23xmYZD+ZhXoisbDBW4yxYg8Ksha0FfGIIcwmlTTeR0dBKQqQBglwN4mvhHzlZNYRPYGEOqTRM250UrRWkSBEEOdQRWP0cx09WjWXAwKPePEZDyRwh29m8s2CRh1y9DsqEwBfV5GRHYckExBeopi5uJqxNxsASCTM2Xgvs1jgblkwILNv8u7D0CiFFWI8YQ7+mfo2zYdXCB4Wrl7vDyASMfAjVng/LSCSM4As17d6YAcuso8H6D67xjZhJsIhob4HbMoVHBB5kKKrt+PGeAsta2G2J1CMQD5AVFbZHTsAcWLXwRk1mT3t5Z8DSWkNrsx/YblEVGUKPgYgjzEo07QxY1sLaFtuqQBZ27sbDDGUzcnJnwJIJgeICXR3HNFLjqbCm/KDd3kJEHEQBljuWPQ3WcBNuRQROhGC541IzYFULDorLWSB+C6wBGG9o9yfDetaYS82ApVfhaSbyp2B1BSaQl4A1BmGOG26XCIghvf3LYBmZgO3uYhnP21kjkTCORfUWLIsyPvacMZAJA/k51MidelFYIvaRvuyaROrHEMUGSusnF3x+ccfwiCGROxelWSMigi+q3gu9i5Gpj1gU2CgN/eSCRmsoKRB7tP+QPADLrKOuxal6HcXAVbvTRzxCLhW06cyjNRpNVWJY4xmwUiF7LmegihxRwIc9GePwDjmYtTCVQOT1erJwhcZaGFXs95jEwA/1bAdgWWtQiajXizKEq2YnRkO9uPdwrmGNp6n59h4fv3+4zL8O/7se2y+4f6wcrKn6/P0O94+VgzVV5udXB+sUOVgOloN1dTlYDpaDdXU5WA6Wg3V1OVgOloN1dTlYDpaDdXX9AuWIS1dpFeMYAAAAAElFTkSuQmCC" alt="" />#</p>

So it seems that somewhere between the share and alfresco connection, the image data is lost or is cut out from the content - when using the first url.

Does anybody know the reason for this behaviour or is there a setting, where i can change it?

As far as we can see, the problem has nothing to do with TinyMCE and die paste_data_image property.

1 Solution

Accepted Solutions
Master

Re: Data Images in cm:content

Jump to solution

I don't know for how long, but Alfresco Share has had the transparent feature of stripping out potentially unsafe HTML tags and attributes at least since 2015. This is courtesy of the SlingshotRemoteClient which handles calls in Share web scripts as well as those using the Share proxy to the Repository-tier. Unfortunately, that feature cannot be disabled. It can be configured by overrding the default bean and specifying tags / elements to filter / leave unaltered.

View solution in original post

2 Replies
Master

Re: Data Images in cm:content

Jump to solution

I don't know for how long, but Alfresco Share has had the transparent feature of stripping out potentially unsafe HTML tags and attributes at least since 2015. This is courtesy of the SlingshotRemoteClient which handles calls in Share web scripts as well as those using the Share proxy to the Repository-tier. Unfortunately, that feature cannot be disabled. It can be configured by overrding the default bean and specifying tags / elements to filter / leave unaltered.

View solution in original post

Member II

Re: Data Images in cm:content

Jump to solution

Thank you for the hint. The default config of spring webscripts is stripping the value of src="data:... Overriding the config both in alfresco and share made the images appearing again.