From 1f10cacd2108458cc4dd8b8344ecd15a89b10c0b Mon Sep 17 00:00:00 2001 From: Manuel Guesdon Date: Mon, 24 Nov 2003 10:58:02 +0000 Subject: [PATCH] o fix in takeValuesFromRequest:inContext: when control was diasbled, previous value was lost. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18167 72102866-910b-0410-8b05-ffd578937521 --- GSWeb.framework/GSWText.m | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/GSWeb.framework/GSWText.m b/GSWeb.framework/GSWText.m index aed75cc..2d9b939 100644 --- a/GSWeb.framework/GSWText.m +++ b/GSWeb.framework/GSWText.m @@ -78,36 +78,10 @@ RCS_ID("$Id$") -(void)takeValuesFromRequest:(GSWRequest*)request inContext:(GSWContext*)context { - if (_value && [_value isValueSettable]) - { - GSWComponent* component=[context component]; - id formValue=[request formValueForKey:[context elementID]]; - NS_DURING - { - [_value setValue:formValue - inComponent:component]; - } - NS_HANDLER - { - LOGException(@"GSWText _value=%@ resultValue=%@ exception=%@", - _value,resultValue,localException); - if (WOStrictFlag) - { - [localException raise]; - } - else - { - [self handleValidationException:localException - inContext:context]; - }; - } - NS_ENDHANDLER; - }; [super takeValuesFromRequest:request inContext:context]; }; - //-------------------------------------------------------------------- -(void)appendToResponse:(GSWResponse*)response inContext:(GSWContext*)context @@ -127,9 +101,13 @@ RCS_ID("$Id$") }; //-------------------------------------------------------------------- +// Replace \r\n by \n -(NSString*)_filterSoftReturnsFromString:(NSString*)string { - LOGObjectFnNotImplemented(); //TODOFN + NSRange range=[string rangeOfString:@"\r\n"]; + if (range.length>0) + string=[string stringByReplacingString:@"\r\n" + withString:@"n"]; return string; };