{ "id": "94524", "key": "AC-2922", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-12-19T04:56:02.000+0000", "created": "2012-07-06T11:06:12.000+0000", "labels": [], "versions": [], "issuelinks": [ { "id": "33927", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "75285", "key": "APSTUD-1958", "fields": { "summary": "HTML formatter should not trim completely consecutive spaces", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:47:54.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "I upgraded Titanium yesterday to this version:\r\n\r\n{panel}\r\nTitanium Studio, build: 2.1.0.201206251749\r\n(c) Copyright 2012 by Appcelerator, Inc. All rights reserved.\r\n\r\nBuild: jenkins-titanium-rcp-master-218 (origin/master)\r\nDate: 25 June 2012, 17:50:34\r\n{panel}\r\n\r\nAnd this is the aptana version:\r\n\r\n{panel}\r\nAptana 3.2.0.20120625, featureid org.radrails.rails\r\n{panel}\r\n\r\nIt seems to have introduced a bug that trims white-space from the html in places where it should not. For example:
Joel Koett
gets trimmed to
JoelKoett
, leaving the results in the view as \"JoelKoett\" rather than \"Joel Koett\".\r\n\r\nAnother example would be in some jsrender scripts I have, which trims:\r\n\r\n{panel}\r\n
blah
\r\n{panel}\r\n\r\nto\r\n\r\n{panel}\r\n
blah
\r\n{panel}\r\n\r\nWhich, after rendered, leaves the class as \"buttonon\" rather than what it should be left as, which is \"button on\".\r\n\r\nNote: This only happens in the compiled code, not in the iphone simulator.\r\n\r\nThanks for your help :),\r\n-- Joel.", "attachment": [], "flagged": false, "summary": "Titanium Trims Too Much White-space from HTML", "creator": { "name": "jkoett", "key": "jkoett", "displayName": "Joel Koett", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jkoett", "key": "jkoett", "displayName": "Joel Koett", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "201850", "author": { "name": "jkoett", "key": "jkoett", "displayName": "Joel Koett", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I believe this is related to:\r\nAPSTUD-1958", "updateAuthor": { "name": "jkoett", "key": "jkoett", "displayName": "Joel Koett", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-06T11:06:43.000+0000", "updated": "2012-07-06T11:06:43.000+0000" }, { "id": "202009", "author": { "name": "jkoett", "key": "jkoett", "displayName": "Joel Koett", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After a day of debugging, it turns out that the issue was not caused by my upgrade to Titanium 2.1 - the issue also happens in Titanium 2.0.1.\r\n\r\nThe white-space trimmer only happens if I have no files with extension \"js\". Due to another issue (TC-1042), I was forced to rename all of my javascript files, but I missed one. Having this one js file prevented the white-space trimmer from happening. Last week, just before my upgrade to Titanium 2.1, I realized that the last remaining js file in my web folder in my Titanium project, was unused, and so I deleted it. This caused the Titanium white-space trimmer to take effect (ONLY ON COMPILED VERSIONS OF THE APP).\r\n\r\nTo fix this bug, I just include a dummy \"js\" file in my project. It's not even referenced anywhere, but it prevents this bug from occurring.\r\n\r\nIt should be noted: The compiler is \"smart\" enough to \"figure out\" that some js files aren't used, and so it doesn't include them in the build (hence ticket TC-1042), but the same compiler uses the fact that there is a JS file (even if it will be stripped via the process in TC-1042 because it's un-referenced) to avoid doing this poorly written white-space trimmer.\r\n\r\nAnd on a final note, I think this white-space trimmer also causes issue TC-1043, my guess is that it trims the white space between the comment line and the closing function, turning:\r\n\r\n{panel}\r\n{code:html}\r\nfunction doSomething() {\r\n // comment\r\n}\r\n{code}\r\n{panel}\r\n\r\ninto:\r\n\r\n{panel}\r\n{code:html}\r\n function doSomething() { // comment }\r\n{code}\r\n{panel}\r\n\r\n(which is invalid javascript, since the closing curly-brace is commented out)\r\n\r\nThanks for your help,\r\n-- Joel.", "updateAuthor": { "name": "jkoett", "key": "jkoett", "displayName": "Joel Koett", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-07T11:03:55.000+0000", "updated": "2012-07-07T11:05:15.000+0000" }, { "id": "208043", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hello,\r\n\r\nCan you please provide a code sample? I did not get why you are renaming the javascript files, and how exactly the app should work.\r\n\r\nThank you", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-07-17T08:34:52.000+0000", "updated": "2012-07-17T08:34:52.000+0000" }, { "id": "208858", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hello,\r\n\r\nAny additional information on this issue?\r\n\r\nThank you\r\n", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-07-23T07:32:57.000+0000", "updated": "2012-07-23T07:32:57.000+0000" }, { "id": "285133", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of APSTUD-1958. APSTUD-1958 has been resolved for sometime now so please let us know if this issue continues to persist and we would be happy to reopen this issue.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-19T04:56:02.000+0000", "updated": "2013-12-19T04:56:02.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }