The media URLs in portal.json are already sent through encodeURIComponent (shouldn't they be sent through encodeURI?). Meanwhile, entry.rmc sends them through encodeURIagain and stores the encoded URI as this.media, causing an escaping "feedback loop". Thanks to @eelfroth for telling me about this!
Some accidentally added media/content/ (escaped: media%2Fcontent%2F) to their media URLs. As it's an easy mistake and easy to fix on our end, this PR fixes the "issue" by removing the improperly added prefix from media URLs.
This fixes the following two issues, both outlined in this comment: https://github.com/Rotonde/rotonde-client/issues/109#issuecomment-343909738
portal.json
are already sent throughencodeURIComponent
(shouldn't they be sent throughencodeURI
?). Meanwhile,entry.rmc
sends them throughencodeURI
again and stores the encoded URI asthis.media
, causing an escaping "feedback loop". Thanks to @eelfroth for telling me about this!media/content/
(escaped:media%2Fcontent%2F
) to their media URLs. As it's an easy mistake and easy to fix on our end, this PR fixes the "issue" by removing the improperly added prefix from media URLs.Thank you @eelfroth for notifying me about this!