Last modified: 2005-11-30 20:20:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T5907, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3907 - Comment replies: words run together
Comment replies: words run together
Status: RESOLVED INVALID
Product: Wikimedia
Classification: Unclassified
Bugzilla (Other open bugs)
unspecified
PC Windows XP
: Normal trivial with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 4005
  Show dependency treegraph
 
Reported: 2005-11-08 07:30 UTC by Brian Jason Drake
Modified: 2005-11-30 20:20 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brian Jason Drake 2005-11-08 07:30:11 UTC
If
I
reply to this comment, I will get:

> Ifyoureply to this comment...
Comment 1 Brian Jason Drake 2005-11-08 07:30:58 UTC
The second line should of course be:

> IfIreply to this comment...

The important point is I just checked it and the bug is 
there.
Comment 2 Rowan Collins [IMSoP] 2005-11-09 01:03:18 UTC
Hm, my first thought was that like so many bugs in "MediaZilla", it's probably
actually a bug in bugzilla itself (http://bugzilla.org). Secondly, it works fine
in Mozilla, and only breaks in IE - perhaps not surprising given that this bug
tracker was created to serve the needs of Mozilla developers :)

But now I try it out, using IE, on http://bugzilla.mozilla.org, I can't
reproduce the error (whereas I can on this site). I don't think it's just a
different version, because the JavaScript functions seem to be the same...

Ah, got it - the comments here are in a <div> with a <br /> at the end of each
line, whereas on b.m.o they're in a <pre>, so the <br />s aren't needed.
Clearly, this is breaking the JavaScript line-splitting routine under IE, which
happens here (look in the source for this page):

    /* make sure we split on all newlines -- IE or Moz use \r and \n
     * respectively */
    text = text.split(/\r|\n/);

Not sure how to get round that; maybe need to explicitly watch for <br /> tags
in the getText() function and add a "\r"?
Comment 3 Brian Jason Drake 2005-11-10 07:59:29 UTC
An "\r" or an "\n"?

I notice that your comment is rendered using:

<div class='comment' id="comment_text_2">Hm, my first 
thought was that like so many bugs in 
&quot;MediaZilla&quot;, it's probably<br />
actually...

So why is there a line break after the word "probably"?
Comment 4 Rowan Collins [IMSoP] 2005-11-10 15:22:26 UTC
(In reply to comment #3)
> An "\r" or an "\n"?

Well, actually it doesn't matter, because it's only got to be spotted by the
"split" regex I quoted - it can just be a placeholder string if we like. 

> So why is there a line break after the word "probably"?

Because that's where the newline gets output in the source (next to the <br> tag
which does the hard-wrapping). In fact, via some red herrings I won't bore you
with, testing confirms that Mozilla sees "\n"s whereever there's a new line in
the source code, while IE sees them *only* inside a <pre> section. 

So all that's needed to make an alternative function for sites using <br>s is an
extra part in getText() like:

} else if (child.tagName == "BR") {
            text += "BR_PLACEHOLDER";
} else ...

and to replace "text.split(\r|\n);" with 
  text = text.replace(/\n|\r/g, "");
  text = text.split(/BR_PLACEHOLDER/);

In other words, ignore the newlines completely, and split on <br>s instead.
Of course, that's no good if the comments *are* in <pre>s, so will *only* work
here, but it does behave the same in both IE and Moz. (It might also make sense
to build the array as we go, rather than inserting and splitting on a magic
string, but I can't be bothered to work out how.)
Comment 5 Brian Jason Drake 2005-11-15 11:47:10 UTC
>> So why is there a line break after the 
word "probably"?

> Because that's where the newline gets output in the 
source (next to the <br> tag
which does the hard-wrapping).

Why was there a <br> tag output at that point?
Comment 6 Rowan Collins [IMSoP] 2005-11-15 13:16:13 UTC
(In reply to comment #5)
> Why was there a <br> tag output at that point?

Because that's where Bugzilla decided to hard-wrap my comment, roughly at the
fairly standard width of 80 columns. Your comments appear to be being wrapped
much more tightly - perhaps IE is hard-wrapping them to your window size?
Comment 7 Brion Vibber 2005-11-16 22:56:33 UTC
bugzilla.mozilla.org

(Note that 2.20 is out and has significant changes to wrapping. We haven't 
upgraded yet as I encountered some serious problems during the upgrade.)
Comment 8 Brian Jason Drake 2005-11-17 03:18:17 UTC
It can't be that IE is wrapping them to my window size 
because the "br" tag was output by the server and the 
server doesn't know my window size.
Comment 9 lɛʁi לערי ריינהארט 2005-11-21 10:45:43 UTC
Note from "LpSolit" from bugzilla.mozilla.org:

> Ask them to try to reproduce the problem on our landfill installation:
>
> http://landfill.bugzilla.org/bugzilla-tip/
>
> If they can, ask them to open a bug on bugzilla.mozilla.org. Else it's either
an invalid bug or a mistake in wikimedia customisation.
>
> LpSolit
Comment 10 Brian Jason Drake 2005-11-27 06:53:28 UTC
That site doesn't work for me.
Comment 11 Brian Jason Drake 2005-11-27 08:22:31 UTC
I can't find the source for that comment.
Comment 12 lɛʁi לערי ריינהארט 2005-11-29 19:13:04 UTC
(In reply to comment #10)
> That site doesn't work for me.

http://landfill.bugzilla.org/bugzilla-tip/ is a bugzilla test installtion using
version Bugzilla Version 2.21.1+

You may log in and make whatever tests you like. For help please join
irc://irc.mozilla.org/mozwebtools .

best regards reinhardt [[user:gangleri]]
Comment 13 Brian Jason Drake 2005-11-30 13:29:19 UTC
It's working now - it came up with a wierd message 
before. Also, "Note from "LpSolit" from 
bugzilla.mozilla.org:" - I can't find where the 
following comment comes from.
Comment 14 lɛʁi לערי ריינהארט 2005-11-30 20:20:00 UTC
see http://landfill.bugzilla.org/bugzilla-tip/show_bug.cgi?id=3202

It seems that this is fixed in Bugzilla Version 2.21.1+

best regards reinhardt [[user:gangleri]]

P.S. The "Note from "LpSolit" was from IRC (  	 irc://irc.mozilla.org/mozwebtools )

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links