[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Sat, 11 Dec 2004 16:31:59 -0000
raeburn Sat Dec 11 11:31:59 2004 EDT
Modified files:
/loncom/interface lonmsg.pm
Log:
Real fix for bug#3507.
Replacement of \n with <br> was breaking links where textarea had split
the <a from the href=" because it needed to break the line. This is a radical
general change to satisfy a specific case. If the replacement functionality is
desirable it might be better to parse the message and only make substitutions
where \n occurs outside HTML tags.
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.122 loncom/interface/lonmsg.pm:1.123
--- loncom/interface/lonmsg.pm:1.122 Sat Dec 11 09:09:46 2004
+++ loncom/interface/lonmsg.pm Sat Dec 11 11:31:59 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.122 2004/12/11 14:09:46 raeburn Exp $
+# $Id: lonmsg.pm,v 1.123 2004/12/11 16:31:59 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -697,7 +697,6 @@
foreach (sort keys %what) {
my %content=&unpackagemsg($what{$_});
next if ($content{'senderdomain'} eq '');
- $content{'message'}=~s/\n/\<br\>/g;
$result.='<hr />'.&mt('From').': <b>'.
&Apache::loncommon::aboutmewrapper(
&Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).'</b> ('.