Skip to content

Commit

Permalink
fix: no display URI encoded background
Browse files Browse the repository at this point in the history
  • Loading branch information
heycalmdown committed Oct 4, 2019
1 parent 825fd04 commit 24f7292
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export function backgroundImage(req) {
const originalSize = !img.attr('height') && !img.attr('width');
const isEmoticon = img.hasClass('emoticon');
if (!originalSize || isEmoticon) return;
section.background = hostToAbsolute(req) + '/image' + sanitizeImageSrc(img.data('image-src'));

// backgroundImage should be URI decoded
const backgroundImage = decodeURI(sanitizeImageSrc(img.data('image-src')));
section.background = hostToAbsolute(req) + '/image' + backgroundImage;
//section['background-image'] = req.baseUrl + '/image' + sanitizeImageSrc(img.data('image-src'));
img.remove();
});
Expand Down

0 comments on commit 24f7292

Please sign in to comment.