Display of records containing line breaks

14 views
Skip to first unread message

Ryan

unread,
Nov 11, 2009, 10:14:16 AM11/11/09
to SubjectsPlus
Hi - I've noticed that when I format text in the Modify Record
interface, line break tags are not propagated through to the guide
display (either editing or public view).

For example, I have the following source code in a record description
field:
<em>Index Area: AI3 .P7</em><br />
<br />
Citations for articles in U.S. and British general interest
periodicals published 1802 &ndash; 1907. <br />
Subject index only.

It appear in the guide page source as:
<em>Index Area: AI3 .P7</em> Citations for articles in U.S. and
British general interest periodicals published 1802 &ndash; 1907.
Subject index only.

Thanks for any input,
Ryan

Andrew Darby

unread,
Nov 11, 2009, 10:46:02 AM11/11/09
to subjec...@googlegroups.com
Hmm. Doesn't happen when i test this. Anybody else seen this behaviour?

Anyway, if you go to records/record.php and change the line near the top

$debugger = "yes";

you'll see what's being submitted to the DB. Do you see the line
breaks (or spacing) in the displayed query when you save the record?
(The queries will be outlined in yellow.)

Do the line breaks appear in the database record, if you check the
appropriate table in the DB? It will be the description field in the
title table, the record_id is in the URL for the page.

Do line breaks work in other instances of FCKEditor--e.g., if you
create a Base Pluslet in the Guide section, or an FAQ?

Andrew

Ryan

unread,
Nov 12, 2009, 11:55:13 AM11/12/09
to SubjectsPlus
Yes it appears the DB is storing the correct html markup.

Including a line break in a Base Pluslet or in a FAQ item works great,
just not with a record item inserted into a base pluslet.

On line 607 of guide_functions.php, it looks like this may be causing
my issue:
$myrow[9] = preg_replace('/(<br \/>)+/','',$myrow[9]);

myrow[9] is the description field in this array of are retrieved
record item.

I thought I'd try just entering "<br>" in the source view of the
record rather than "<br />" to get around the replace, but apparently
FCKeditor doesn't like that!

Ryan

On Nov 11, 9:46 am, Andrew Darby <agda...@gmail.com> wrote:
> Hmm.  Doesn't happen when i test this.  Anybody else seen this behaviour?
>
> Anyway, if you go to records/record.php and change the line near the top
>
> $debugger = "yes";
>
> you'll see what's being submitted to the DB.  Do you see the line
> breaks (or spacing) in the displayed query when you save the record?
> (The queries will be outlined in yellow.)
>
> Do the line breaks appear in the database record, if you check the
> appropriate table in the DB?  It will be the description field in the
> title table, the record_id is in the URL for the page.
>
> Do line breaks work in other instances of FCKEditor--e.g., if you
> create a Base Pluslet in the Guide section, or an FAQ?
>
> Andrew
>

Andrew Darby

unread,
Nov 12, 2009, 12:23:05 PM11/12/09
to subjec...@googlegroups.com
So if you comment out line 607 does it work? It should mean just a
little extra whitespace at the end.

Ryan

unread,
Nov 12, 2009, 12:34:39 PM11/12/09
to SubjectsPlus
Yep that worked (meant to include that above - doing too many things
at once this morning!). None of my record items contain a closing
"<br />" anyway, so it looks the same for me, only with the breaks
where I want them! :)

On Nov 12, 11:23 am, Andrew Darby <agda...@gmail.com> wrote:
> So if you comment out line 607 does it work?  It should mean just a
> little extra whitespace at the end.
>
Reply all
Reply to author
Forward
0 new messages