Public bug reported: Error expanding org unit tree, discovered in v2.22 rev 21297, using Chrome v49 & Firefox v44.
User reported that for one org unit region they could not expand the org unit tree, but it expanded fine for all other regions. There is no indication to the user of what is failing - no action occurs. Somehow they'd manage to get a control character in the name of an org unit within that tree. When clicking the 'plus' sign got error in processing response "JSON.parse: Bad control character in string literal" JSON code snippet with offending line { "version":"4a38eddd-8658-470e-ab2b-64fb9cff32f5" ,"username":"david.pal...@mariestopes.org" ,"roots": [ "tBRaGpbSPfW" ] ,"organisationUnits": {........jVRfi2","n":"Lims Medical center (GH1303 )","pid":"fpVliF1lBoa","c":[]} ,.......} Offending character was in the "Lims Medical Center" line. Probably a new line after the GH1303. Possible solutions: - User input is sanitised when creating org units (and for creating metadata through import/API) - Org unit tree JSON is sanitised on page load, and invalid control characters removed. Or an error displayed to the user. ** Affects: dhis2 Importance: Undecided Status: New -- You received this bug notification because you are a member of DHIS 2 developers, which is subscribed to DHIS. https://bugs.launchpad.net/bugs/1577312 Title: Org unit tree does not expand if org unit contains bad control character Status in DHIS: New Bug description: Error expanding org unit tree, discovered in v2.22 rev 21297, using Chrome v49 & Firefox v44. User reported that for one org unit region they could not expand the org unit tree, but it expanded fine for all other regions. There is no indication to the user of what is failing - no action occurs. Somehow they'd manage to get a control character in the name of an org unit within that tree. When clicking the 'plus' sign got error in processing response "JSON.parse: Bad control character in string literal" JSON code snippet with offending line { "version":"4a38eddd-8658-470e-ab2b-64fb9cff32f5" ,"username":"david.pal...@mariestopes.org" ,"roots": [ "tBRaGpbSPfW" ] ,"organisationUnits": {........jVRfi2","n":"Lims Medical center (GH1303 )","pid":"fpVliF1lBoa","c":[]} ,.......} Offending character was in the "Lims Medical Center" line. Probably a new line after the GH1303. Possible solutions: - User input is sanitised when creating org units (and for creating metadata through import/API) - Org unit tree JSON is sanitised on page load, and invalid control characters removed. Or an error displayed to the user. To manage notifications about this bug go to: https://bugs.launchpad.net/dhis2/+bug/1577312/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp