The following statement runs fine:
$wb.upLinearLoad.append(\'\' + sprintf(\"%5s%8.1f to%7.1f%8.1f%6.0f%8.0f\",sLinearSegName[i][j],fLinearPtBA[i][j],f
Just don't do it using strings. Instead, use the jQuery/DOM manipulation. It's less prone to error and more efficient.
$wb.upLinearLoad.append(
$('<div>').append(
sprintf("%5s%8.1f to%7.1f%8.1f", sLinearSegName[i][j], fLinearPtBA[i][j], fLinearPtBA[i][j+1], fLen),
$('<span>').addClass('wt').text(sprintf("%6.0f%8.0f</span>", fLinearPtPpi[i][j], fLinearSegMaxWt[i][j]))[0]
)
);