[pmwiki-devel] (no subject)

The Editor editor at fast.st
Mon Apr 2 11:55:23 CDT 2007


I'm retrieving this value a textarea for editing (that allows you to
edit sections of a page defined by anchors), and it seems to lose the
\n when it is pulled in.  As a result, the line return disappears when
the content is resaved.  I could manually reinsert it, but then cases
where there is no line break get messed up.

So where the problem is, I'm not sure.  It could be an html thing that
ignores an initial line return following a textarea input field.

Cheers,
Dan

PS.  Thanks for taking a peek.


On 4/2/07, J. Meijer <commentgg at hotmail.com> wrote:
>
> Caveman, I don't see the problem. The following works on my system, printing
> 'XXXXXXXXXX'
>
>
> $source = "[[#IDtest]]
> Next Line";
> $a = "[[#IDtest]]";
> $source = substr($source, strlen($a));
> if($source == "
> Next Line") print"XXXXXXXXXXX";
>
> You're looking at it in a browser (which treats the newline as a space)?
>
>
> /jm
>
>
>
>
>
> On 4/2/07, The Editor <editor at fast.st> wrote:
> > I have another bug I can't seem to get my head around.
> >
> > Given
> >
> > $source = "[[#IDtest]]
> > Next Line";
> > $a = "[[#IDtest]]";
> >
> > I would expect
> >
> > $source = substr($source, strlen($a));
> >
> > to return Next Line with a line return at the beginning.  But php
> > seems to disregard the linebreak.  If I add -1 to the substr, it takes
> > off the closing link bracked.  So the number is right.  Any
> > suggestions?
> >
> > Just a minor thing, but kind of irritating me...
> >
> > Cheers,
> > Dan
> >
> > _______________________________________________
> > pmwiki-devel mailing list
> > pmwiki-devel at pmichaud.com
> > http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
> >
>
>
>
> ________________________________
> It's tax season, make sure to follow these few simple tips Check it out!



More information about the pmwiki-devel mailing list