top

Difference in New Line Marker on 2012 platform

Published 2014-10-27 | (Compatible with SDK 3.5,4.5,5.0,5.1 and 2012,2013,2014 models)

New line character encoding for 2012 devices

Sequence of Characters for New Line Marker is different for Maple & WebKit Platforms.

Add webkit method of handling New Line Marker.

Source Files

Note

The files needed for the sample application are here.

Bad example

parsed += '<p>' + cont.split('\r\n') + '</p>';

Good example

if (navigator.appName == 'Netscape') {
    parsed += '<p>' + cont.split('\n') + '</p>';
} else {
    parsed += '<p>' + cont.split('\r\n') + '</p>';
}