Please read. Significant change on the site that will affect compatibility [ Dismiss ]
Home ยป Forum ยป Bug Report and Feature Requests

Forum: Bug Report and Feature Requests

Extra Line Feeds in Forum posts

Dinsdale ๐Ÿšซ

There has been a very recent change to the Forum where something input as:

text

text

link to story

link to story

gets two BR tags after each line, basically inserting a blank line after each non-blank line. If I then go and edit it, it gets an additional BR tag / blank line after each non-blank line but this is something I have lived with since the forum first saw the light of day.

A Firefox-based browser on a (Linux) PC.

Lazeez Jiddan (Webmaster)

@Dinsdale

There has been a very recent change to the Forum

That's odd. I haven't touched any of the forum's code for months now.

Replies:   Dinsdale
Dinsdale ๐Ÿšซ

@Lazeez Jiddan (Webmaster)

Well, those four lines (text/text/link/link) were posted on four adjacent lines with no blank lines between them.

Gauthier ๐Ÿšซ

@Dinsdale

That bug has been present for years: Edit any post and save it. the original rn appears as < br > rn and on save are converted to < br >< br> rn in effect doubling the html interline.

Replies:   Dinsdale
Dinsdale ๐Ÿšซ

@Gauthier

If I then go and edit it, it gets an additional BR tag / blank line after each non-blank line but this is something I have lived with since the forum first saw the light of day.

That is what I was referring to there, what this thread is about is that it is now happening right from the start.

Replies:   Switch Blayde
Switch Blayde ๐Ÿšซ

@Dinsdale

it is now happening right from the start

Testing this

with no blank lines

Replies:   Dinsdale
Dinsdale ๐Ÿšซ

@Switch Blayde

And that is not an effect I have noticed before today.

Replies:   Switch Blayde
Switch Blayde ๐Ÿšซ

@Dinsdale

And that is not an effect I have noticed before today.

I agree.

Right now you cannot have two lines without a blank line between them. That's new.

In the past, you were able to do that. But when you edited the post, you ended up with the blank line and had to manually delete the BRs

Lazeez Jiddan (Webmaster)

@Switch Blayde

Right now you cannot have two lines without a blank line between them. That's new.

That's not caused by change in the forum's code. As I said, I haven't changed the forum's code in quite a while.

However, a change in browser behaviour may cause something like this.

It's technical, but different platforms handle line break encoding differently.

Windows uses a new-line+carriage-return characters in tandem for every new line.

Unix uses a new line only.

Before Mac OS X, the Mac used a carriage return only, after OS X it switched to new line as it's a unix system.

Strangely, on the Mac, Safari converts new line characters to the windows convention of New-Line+Carriage-return.

So doing < br> tags is somewhat tricky.

I didn't change how this is handled, but maybe some underlying library on the server changed that behaviour or the user's browser changed behaviour triggering new behaviour on the forum.

Replies:   Switch Blayde
Switch Blayde ๐Ÿšซ
Updated:

@Lazeez Jiddan (Webmaster)

or the user's browser changed behaviour

OP using Firefox on Linux on PC.

I'm using Safari on a Mac.

Same thing is happening to both of us.

Replies:   Dinsdale
Dinsdale ๐Ÿšซ

@Switch Blayde

Actually it's Seamonkey, and my current level has been on my machine since the second day of April. Seamonkey and Firefox (and Thunderbird) have the same original code base.

Switch Blayde ๐Ÿšซ

@Dinsdale

There has been a very recent change

It's always been like that.

Dinsdale ๐Ÿšซ

@Dinsdale

Experimenting with:

text(BR)text(BR)more text

texttextmore text

Dinsdale ๐Ÿšซ

@Dinsdale

Well that was a complete failure, it ate my (BR) tags (the round brackets were of course replaced by < and >)

Lazeez Jiddan (Webmaster)
Updated:

@Dinsdale

I think
it's fixed
now.

Replies:   Dinsdale  Switch Blayde
Dinsdale ๐Ÿšซ

@Lazeez Jiddan (Webmaster)

That is exactly what
I was looking
and hoping
for.
Thank You!

(Note the deliberate blank line) - just out of interest, what happened? (not that it'll kill me if I don't find out)

Lazeez Jiddan (Webmaster)

@Dinsdale

just out of interest, what happened?

I don't know. I didn't bother to investigate what is going on. The last code commit on that script was over a year ago. So if this behaviour is recent, it must have been a change the underlying PHP libraries.

To fix it, I simply added few lines to the code to make sure that there are no carriage returns at all; that fixed the additional new lines.

Then I went into the form generator for post editing and put in code to remove the < br> tags before the form template.

Switch Blayde ๐Ÿšซ

@Lazeez Jiddan (Webmaster)

It also fixed the old problem when editing the post added the < BR>s

Good job

Back to Top

Close
 

WARNING! ADULT CONTENT...

Storiesonline is for adult entertainment only. By accessing this site you declare that you are of legal age and that you agree with our Terms of Service and Privacy Policy.


Log In