Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10365] iOS: Corrupted URL on image attribute for ImageView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-05-03T06:19:19.000+0000
Affected Version/sRelease 2.1.0
Fix Version/s2013 Sprint 09
ComponentsiOS
Labelsapi, exalture
ReporterJuan G. Hurtado
Assigneejithinpv
Created2012-07-09T08:27:17.000+0000
Updated2017-03-17T18:46:29.000+0000

Description

I'm trying to print an ImageView containing a vCard inside aQR Code generated by Google Charts. The URL for the QR Code is: http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=BEGIN:VCARD%0AVERSION:2.1%0AN:Ipsum;Lorem;;;%0AFN:Lorem%20Ipsum%0AORG:Company%20Ipsum%0ATITLE:Lorem%20Ipsum%20developer%0ATEL:555%20555%20555%0AEMAIL:vcard@exaple.net%0AEND:VCARD&chld=H|0 Accessed via browser works fine (the content of the QR Code is a valid vCard). When used on the "image" attribute of the ImageView, content of the QR Code is not a valid vCard (it gets escaped values inside the QR Code). Sample code:
var win = Ti.UI.createWindow({
    backgroundColor: '#fff'
});
win.add(Ti.UI.createImageView({
    image: 'http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=BEGIN:VCARD%0AVERSION:2.1%0AN:Ipsum;Lorem;;;%0AFN:Lorem%20Ipsum%0AORG:Company%20Ipsum%0ATITLE:Lorem%20Ipsum%20developer%0ATEL:555%20555%20555%0AEMAIL:vcard@exaple.net%0AEND:VCARD&chld=H|0',
    width: 300, height: 300
}));
win.open();
Expected (and obtained when using the URL on browser):
BEGIN:VCARD
VERSION:2.1
N:ipsum;lorem;;;
FN:Lorem Ipsum
ORG:Company Ipsum
TITLE:Lorem Ipsum developer
TEL:555 555 555
EMAIL:vcard@exaple.net
END:VCA
Result:
BEGIN:VCARD%0AVERSION:2.1%0AN:Ipsum;Lorem;;;%0AFN:Lorem%20Ipsum%0AORG:Company%20Ipsum%0ATITLE:Lorem%20Ipsum%20developer%0ATEL:555%20555%20555%0AEMAIL:vcard@exaple.net%0AEND:VCARD

Comments

  1. Juan G. Hurtado 2012-07-16

    Any updates on this? Could you reproduce it? Need more info?
  2. Nikhil Sharma 2012-07-16

    Hi Juan, Are you reporting this issue for android or iOS?
  3. Juan G. Hurtado 2012-07-16

    I've tested on iOS (sorry about not specifying), I don't know if it fails on Android.
  4. Juan G. Hurtado 2012-09-04

    Confirmed: It only fails on iOS.
  5. jithinpv 2013-05-03

    cannot reproduce Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
  6. Lee Morris 2017-03-17

    Closing ticket as the issue cannot be reproduced.

JSON Source