diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-03-16 14:59:00 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-03-16 11:59:00 -0700 |
commit | 24848f9d6a92eb1e09189c358636fd1ba32fa6d6 (patch) | |
tree | a0061bcefe49daa3104f57fc77370facae03a53b /webapp/components/post_view | |
parent | d757645c2490dd4f0de16cc32e05551b1476d0a0 (diff) | |
download | chat-24848f9d6a92eb1e09189c358636fd1ba32fa6d6.tar.gz chat-24848f9d6a92eb1e09189c358636fd1ba32fa6d6.tar.bz2 chat-24848f9d6a92eb1e09189c358636fd1ba32fa6d6.zip |
PLT-3181 Added crossorigin='anonymous' to all external images (#5774)
* PLT-3181 Added crossorigin='anonymous' to all external images
* Fixed image unit tests
* Added crossorigin='anonymous' to a few more places
Diffstat (limited to 'webapp/components/post_view')
3 files changed, 6 insertions, 0 deletions
diff --git a/webapp/components/post_view/components/post_attachment.jsx b/webapp/components/post_view/components/post_attachment.jsx index 57335b94a..1b2cddcd6 100644 --- a/webapp/components/post_view/components/post_attachment.jsx +++ b/webapp/components/post_view/components/post_attachment.jsx @@ -184,6 +184,7 @@ class PostAttachment extends React.Component { author.push( <img className='attachment__author-icon' + crossOrigin='anonymous' src={data.author_icon} key={'attachment__author-icon'} height='14' @@ -257,6 +258,7 @@ class PostAttachment extends React.Component { image = ( <img className='attachment__image' + crossOrigin='anonymous' src={data.image_url} /> ); @@ -269,6 +271,7 @@ class PostAttachment extends React.Component { className='attachment__thumb-container' > <img + crossOrigin='anonymous' src={data.thumb_url} /> </div> diff --git a/webapp/components/post_view/components/post_attachment_opengraph.jsx b/webapp/components/post_view/components/post_attachment_opengraph.jsx index 12437e672..b1ebf0a4b 100644 --- a/webapp/components/post_view/components/post_attachment_opengraph.jsx +++ b/webapp/components/post_view/components/post_attachment_opengraph.jsx @@ -201,6 +201,7 @@ export default class PostAttachmentOpenGraph extends React.Component { element = this.wrapInSmallImageContainer( <img className={'attachment__image attachment__image--openraph'} + crossOrigin='anonymous' src={imageUrl} ref={(img) => { this.smallImageElement = img; diff --git a/webapp/components/post_view/components/post_image.jsx b/webapp/components/post_view/components/post_image.jsx index 9a761bfca..6fe954e99 100644 --- a/webapp/components/post_view/components/post_image.jsx +++ b/webapp/components/post_view/components/post_image.jsx @@ -67,6 +67,7 @@ export default class PostImageEmbed extends React.Component { return ( <img className='img-div placeholder' + crossOrigin='anonymous' height='500px' /> ); @@ -75,6 +76,7 @@ export default class PostImageEmbed extends React.Component { return ( <img className='img-div' + crossOrigin='anonymous' src={this.props.link} /> ); |