Can't display images in RSS feeds with protocol-relative URLs

Bug #1234582 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Won't Fix
Medium
Unassigned

Bug Description

As described by Robert while investigating another bug report: https://bugs.launchpad.net/mahara/+bug/1219499/comments/5

The problem where some images are not showing up is because they tend to be protocol relative urls to the images and the Mahara system tries to append a url to them but this makes the path incorrect.

eg for slideshare (http://www.slideshare.net/rss/latest)

There are image links in the feed like:

//cdn.slidesharecdn.com/ss_thumbnails/lptrnhc2008cbnnhtnghththutit360-130902225125-phpapp02-thumbnail-2.jpg

and mahara sees this as a relative url and appends http://www.slideshare.net/ to the front if it which then makes

http://www.slideshare.net//cdn.slidesharecdn.com/ss_thumbnails/lptrnhc2008cbnnhtnghththutit360-130902225125-phpapp02-thumbnail-2.jpg

which is an incorrect url and the image will not be found there

Need to alter the code in htdocs/blocktype/externalfeed/lib.php from /src="(\/[^"]+)"/ to something that doesn't try and update protocol relative urls

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0 → 1.8.1
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.1 → 1.8.2
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 1.8.2 → 1.8.3
Aaron Wells (u-aaronw)
no longer affects: mahara/1.6
no longer affects: mahara/1.7
no longer affects: mahara/1.8
no longer affects: mahara/1.9
Aaron Wells (u-aaronw)
tags: added: snack-sized
no longer affects: mahara/1.10
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.04.1 → 16.10.0
no longer affects: mahara/15.04
no longer affects: mahara/15.10
no longer affects: mahara/16.04
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.0 → 16.10.1
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.1 → 17.04.0
Changed in mahara:
milestone: 17.04.0 → none
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Since every site is now virtually on https this is not relevant anymore.

Changed in mahara:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.