Thanks for reporting.. I haven't seen this issue before, but will look
into it :) This is all done by the Jackson library.. so we might have to
tweak some settings.

** Changed in: dhis2
     Assignee: (unassigned) => Morten Olav Hansen (mortenoh)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1617416

Title:
  LFs removed on import, breaking custom JS

Status in DHIS:
  New

Bug description:
  Hello Devs

  It looks like uploads against both /metaData and /xx/metadata are
  removing LFs in their entirety from <dataEntryForms> htmlcode. I
  prepared a table to show:

  +---------+-----------------------+---------------------------------+
  | Version |     Upload Method     |             Result              |
  +---------+-----------------------+---------------------------------+
  |    2.24 | C&P GUI               | Good                            |
  |    2.24 | Import GUI            | Good                            |
  |    2.24 | curl /api/metaData    | LF's removed; breaks javascript |
  |    2.24 | curl /api/24/metadata | LF's removed; breaks javascript |
  |    2.23 | C&P GUI               | Good                            |
  |    2.23 | Import GUI            | Good                            |
  |    2.23 | curl /api/metaData    | LF's removed; breaks javascript |
  |    2.23 | curl /api/23/metadata | LF's removed; breaks javascript |
  +---------+-----------------------+---------------------------------+

  
  So this affects both the latest versions of 2.23 and 2.24. When the form is 
rendered in the dataentry app, after all the alterations done by dhis 2, many 
LFs are added back in, BUT, the items between the <script> tags are left as is. 
This will sometimes make the forms not appear at all:

  <a
  link="href://https://drive.google.com/open?id=0B9eJ8PZ_4csMWTVpcGxWRGg1N0U";>JS
  Error</a>

  The easiest way to recreate this is to take the following file, and
  upload it to a vanilla 2.23 or 2.24

  /metaData
  <a 
href="https://drive.google.com/open?id=0B9eJ8PZ_4csMZVZ2c3IybU8tazg";>Download 
Here</a>

  /##/metadata (notice the case difference)
  <a 
href="https://drive.google.com/open?id=0B9eJ8PZ_4csMeVZVNFhZdGZtbTA";>Download 
here</a>
  Note that when using the GUI, all the LFs are preserved.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1617416/+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

Reply via email to