Opened 6 years ago
#15618 new defect
jabber_x_data_ok_cb does not treat \r as a newline in a multiline text field
Reported by: | xnyhps | Owned by: | deryni |
---|---|---|---|
Milestone: | Component: | XMPP | |
Version: | 2.10.7 | Keywords: | dataforms xep-0004 |
Cc: | darkrain |
Description
Data provided for fields of type "text-multi" SHOULD NOT contain any newlines (the \n and \r characters). Instead, the application SHOULD split the data into multiple strings (based on the newlines inserted by the platform), then specify each string as the XML character data of a distinct <value/> element
However, jabber_x_data_ok_cb splits on "\n" and completely ignores \r. In my opinion, it should split on \r\n, \r and \n (the last two only if they don't occur in the first, of course).
Attached is a patch which replaces "\r\n" with "\n" and '\r' with '\n' (in that order) before splitting.
Attachments (1)
Note: See
TracTickets for help on using
tickets.