[Cartoweb-users] CRLF in TEXTAREA (edition plugin) - problems

Oliver Christen oliver.christen at camptocamp.com
Thu Jun 28 02:38:45 EDT 2007


Hi Igor

I think you should do that when you receive the textarea data when the user 
submit the new feature. After all, you dont need to store the line return, 
as long as the textarea has wrap enabled, long line will be wraped 
automaticaly.

You can do that when the values are recovered, in the handleHttpPostRequest 
(ClientEdit.php), rework the $value before the line 
$this->updateFeaturesArray($id, Encoder::encode($value));

regards
Oliver


> Hi again!
>
> I created one TEXTAREA field in edition plugin instead of INPUT.
> I works, but if user adds string in this TEXTAREA with CRLF (wrap  lines),
> further edition (selection of this point to edit) fails with error
>
> Error: unterminated string literal
> Source: http://imac.local/cartoweb/htdocs/terraphoto.php
> String 86, Symbol 92
> Source:
>     feature.attributes = new Array("4","shgsdfh","/terraphoto/ 
> incoming/2249Puerto_Rico.gif","sdhsdfhsdf
>
> (after "sdhsdfhsdf" there was CRLF).
>
> I think I must replace CRLF symbol with <br> (for example) via 
> STR_REPLACE,
> but I don't know - where in sources I must insert this replacing.
> Or I should do it any other way?
>
> Best regards, Igor.
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list