[Pidgin] #15618: jabber_x_data_ok_cb does not treat \r as a newline in a multiline text field

Pidgin trac at pidgin.im
Mon Apr 29 17:07:59 EDT 2013


#15618: jabber_x_data_ok_cb does not treat \r as a newline in a multiline text
field
--------------------+--------------------------------
 Reporter:  xnyhps  |      Owner:  deryni
     Type:  defect  |     Status:  new
Milestone:          |  Component:  XMPP
  Version:  2.10.7  |   Keywords:  dataforms xep-0004
--------------------+--------------------------------
 [http://xmpp.org/extensions/xep-0004.html#protocol-fieldtypes XEP-0004]:

 > 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.

-- 
Ticket URL: <https://developer.pidgin.im/ticket/15618>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list