IE uses CRLF for newlines in textboxes

Bug #588679 reported by David Coles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IVLE
Fix Released
Medium
David Coles

Bug Description

When you get the value of a text box in IE8, newlines contain CRLFs.

This will cause syntax errors when submitting or running this code in a console since it's an error to mix CRLF with LF in a Python file. Using jQuery's text() function seems to make things worse by turning a CRLF into just a CR (does anything use that anymore!).

Whilst we could silently transcode CRLFs to LFs inside the IVLE server it seems to be a bad idea when people might explicitly want a CRLF. Thus I suggest we contain all newline silliness inside the webclient and mandate that new lines should be sent as a single LF to the server.

This means that you need to do a `replace(/\r\n/g, '\n').replace(/\r/g, '\n')` on all content read from a multi-line textbox before it's sent to the server.

Tags: ie8

Related branches

David Coles (dcoles)
description: updated
David Coles (dcoles)
Changed in ivle:
status: In Progress → Fix Committed
William Grant (wgrant)
Changed in ivle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.