Carriage return BUG

Events happening in the community are now at Drupal community events on www.drupal.org.
ernestd's picture

Everybody knows internet explorer adds \r\n instead of \n everytime we hit return

I've tried in several ways to delete the \r before and after the asynchronous call both in server and client side:

<?php
$new_content
= str_replace("\r\n", "\n", $new_content);
?>

currentContent = currentContent.replace(/\r\n/g, "\n" );

But IE still add the "invisible" character at the end of the line. As a result, if we delete the end of the line (i.e. merging two lines in one) there will be a wrong replacement length value (i.e. 4 instead of 3) and the content in both users will be different
Sometimes it does an automatic replacement when the user even hasn't typed anything and then enters in a loop of use cases 4->1->2->4->1.... Since the user is sending blank changes to other users

Bug also reported here

SoC 2006: Collaborative Editor

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: