Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13545] Android: ImageView: Remote image with "@" character doesn't display

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-02-24T21:06:03.000+0000
Affected Version/sRelease 3.1.0
Fix Version/s2013 Sprint 08 API, 2013 Sprint 08, Release 4.0.0
ComponentsAndroid
Labelsandroid, image, imageview, qe-testadded, regression, remoteURL
ReporterMartin Guillon
AssigneeHieu Pham
Created2013-04-12T13:01:44.000+0000
Updated2015-03-11T22:35:30.000+0000

Description

*Problem description* If you set an image with a "@" in the path, the image won't be loaded. This is because getCleanUri thinking it's a domain address. Therefore the test on the hash will return false. So the image is downloaded but not drawn. *Repro notes* Paste the @2x URL in the browser to verify the URL is valid. Uncomment cd-mini-graphic image to verify it working for standard images. Only the URL with @2x doesn't work. Works on iOS, not on Android. *Test case*
var win = Ti.UI.createWindow({
	backgroundColor : 'white'
});

var image = Ti.UI.createImageView({
	bottom : 0,
	width : 200,
	height : 200,
	backgroundColor : 'red',
	image : 'http://dl.dropboxusercontent.com/u/255893/appcelerator@2x.png'
	//image : 'http://www.appcelerator.com.s3.amazonaws.com/web/home/platform/cd-mini-graphic.png'
});

win.add(image);
win.open();

Comments

  1. Daniel Sefton 2013-04-12

    Tested and confirmed with Samsung Galaxy S2 Android 2.3.6, Ti SDK 3.1 CI.
  2. Daniel Sefton 2013-04-12

    Confirmed as regression between 2.1.4 GA and 3.0.2 GA.
  3. Ping Wang 2013-04-15

    PR: https://github.com/appcelerator/titanium_mobile/pull/4161
  4. Ping Wang 2013-04-22

    3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4195
  5. Paras Mishra 2013-05-03

    Image is displayed. Working as expected. Verified on: Tested on: Device: Samsung Galaxy Note, Android version: 2.3.6 SDK: 3.1.1.v20130502180055 CLI version : 3.1.0 OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.0.201305020752 XCode : 4.5.1
  6. Khushbu Agrawal 2014-11-03

    Reopening the issue as it's not working as expected. The image is not loaded when the URL is containing the @2x symbol. The load event didn't get fire. Verified with below Environment with mentioned URL:- http://dl.dropboxusercontent.com/u/255893/appcelerator@2x.png Tested on: 1. Mac OSX Yosemite 10.10 2. Appcelerator Studio, build: 3.4.1.201410281743 3. Titanium SDK, build: 3.4.1.v20141028145715 4. Titanium CLI, build: 3.4.1-dev 5. Alloy: 1.5.1 6.S Galaxy S5 with Android 4.4.2 / Nexus 4.2 with Android 4.2.1 7. Android 5.0 API 21 and Android SDK Build-Tools 20 For Regression testing, I have verified the issue with Ti SDK 3.4.0.GA and Ti SDK 3.3.0.GA. The link didn't work with this Ti SDK too.So can't mark it as Regression.
  7. Khushbu Agrawal 2014-11-03

    Added load event code with the above test code.
       image.addEventListener('load', function(e){
       		    Ti.API.info("---------image is loaded ----------------- ");
       	  });
       
  8. Ping Wang 2015-01-13

  9. Eric Wieber 2015-03-11

    Verified fixed using: Titanium SDK 4.0.0.v20150311105810 Studio 4.0.0.201503062102 CLI 3.4.2 Xcode 6.2 Node 0.10.36 On: Galaxy Note 2, Android 4.3 Correctly displayed remote image with '@' in title.

JSON Source