NewsBlur interpreting SRCSET as a single URL, not a list of options, when selecting preview image

  • 1
  • Problem
  • Updated 1 week ago
  • (Edited)
When selecting the preview image (the small image shown to the right of each entry in the list of stories) NewsBlur is misinterpreting the SRCSET attribute in the <IMG> tag of the feed.  SRCSET is being treated as a single URL, instead of as a list to be selected from.  I've observed this on the iOS client, the Android client, and the web interface, so I believe it's something happening on the server end.

Examples are visible the feed at: https://www.jwz.org/blog/feed/?_=3781

For example, the story "Today in rectal eel news."has a <content:encoded> section that includes this:

<IMG SRC="https://www.jwz.org/images/scaled/768/2017/nintchdbpict000317791931.jpg"; data-size="2000x1768" STYLE="width: 100%; height: auto; max-width: 2000px; max-height: 1768px; border: 1px solid; box-sizing: border-box;" SRCSET="https://www.jwz.org/images/scaled/768/2017/nintchdbpict000317791931.jpg 2000w, https://www.jwz.org/images/scaled/1280/2017/nintchdbpict000317791931.jpg 1280w, https://www.jwz.org/images/scaled/768/2017/nintchdbpict000317791931.jpg 768w, https://www.jwz.org/images/scaled/640/2017/nintchdbpict000317791931.jpg 640w, https://www.jwz.org/images/scaled/360/2017/nintchdbpict000317791931.jpg 360w" SIZES="(max-width: 660px) 31vw, 23em">

In the HTML on the NewsBlur web interface, I'm given this:
<div class="NB-storytitles-story-image" style="background-image: none, url(&quot;https://www.jwz.org/images/scaled/768/2017/nintchdbpict000317791931.jpg%202000w,%20https://www.jwz.org/images/scaled/1280/2017/nintchdbpict000317791931.jpg%201280w,%20https://www.jwz.org/images/scaled/768/2017/nintchdbpict000317791931.jpg%20768w,%20https://www.jwz.org/images/scaled/640/2017/nintchdbpict000317791931.jpg%20640w,%20https://www.jwz.org/images/scaled/360/2017/nintchdbpict000317791931.jpg%20360w&quot;); display: block;"></div>

which is trying to load

https://www.jwz.org/images/scaled/768/2017/nintchdbpict000317791931.jpg%202000w,%20https://www.jwz.o...

when I would have expected

https://www.jwz.org/images/scaled/768/2017/nintchdbpict000317791931.jpg

or something similar chosen from the list.

This happens with some frequency in JWZ's feed, and he's currently serving a special image for the malformed requests, which hopefully should make it easier to identify.
Photo of Alan

Alan

  • 25 Posts
  • 1 Reply Like
  • mildly annoyed

Posted 1 month ago

  • 1
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6399 Posts
  • 1457 Reply Likes
Hey I just fixed this last night. It should work on any stories published after 11pm PT yesterday.
Photo of Alan

Alan

  • 25 Posts
  • 1 Reply Like
I've observed the unexpected behavior again. In the feed https://www.jwz.org/blog/feed/?_=3781

For the item
        <title>I see no way this could possibly go wrong.</title>
        <link>https://www.jwz.org/blog/2017/11/i-see-no-way-this-could-possibly-go-wrong/</link>;

The <content:encoded> has this:
    <IMG SRC="https://www.jwz.org/images/scaled/768/2017/x-2017-11-28-at-9.18.13-pm.png"; data-size="894x692" STYLE="width: 50%; height: auto; max-width: 894px; max-height: 692px; border: 1px solid; box-sizing: border-box; margin: 0 0 1em 1em; float: right; clear: right;" SRCSET="https://www.jwz.org/images/scaled/768/2017/x-2017-11-28-at-9.18.13-pm.png 894w, https://www.jwz.org/images/scaled/768/2017/x-2017-11-28-at-9.18.13-pm.png 768w, https://www.jwz.org/images/scaled/640/2017/x-2017-11-28-at-9.18.13-pm.png 640w, https://www.jwz.org/images/scaled/360/2017/x-2017-11-28-at-9.18.13-pm.png 360w" SIZES="(max-width: 660px) 50vw, 36em">

For the preview image on the story list, Newsblur for the web chose this URL:
    https://www.jwz.org/images/scaled/768/2017/x-2017-11-28-at-9.18.13-pm.png%20894w,%20https://www.jwz.org/images/scaled/768/2017/x-2017-11-28-at-9.18.13-pm.png%20768w,%20https://www.jwz.org/images/scaled/640/2017/x-2017-11-28-at-9.18.13-pm.png%20640w,%20https://www.jwz.org/images/scaled/360/2017/x-2017-11-28-at-9.18.13-pm.png%20360w
Photo of Alan

Alan

  • 25 Posts
  • 1 Reply Like
I think it was working for a while.  The item
		<title>Baphomet dons his fearsome &quot;Tree Topper&quot; aspect.</title>
		<link>https://www.jwz.org/blog/2017/11/baphomet-dons-his-fearsome-tree-topper-aspect/</link>
appears to have done the right thing, but the very next item
		<title>Pale Waves</title>
		<link>https://www.jwz.org/blog/2017/11/pale-waves/</link>

does not.