Closed
Bug 23719
Opened 25 years ago
Closed 25 years ago
Common Dialogs not inserting linebreaks properly
Categories
(SeaMonkey :: UI Design, defect, P3)
Tracking
(Not tracked)
People
(Reporter: bugs, Assigned: bugs)
References
()
Details
"\n" in alert() strings are being ignored, and a raw "n" being inserted.
e.g. alert("Foo\n\nBar") should display an alert containing:
+-------------+
| Foo |
| |
| Bar |
|-------------|
| [ OK ] |
+-------------+
but instead displays
+-------------+
| FoonnBar |
|-------------|
| [ OK ] |
+-------------+
I looked at the code in commonDialog.js, and it seems that the code does this:
param = window.arguments[0].QueryInterface(
Components.interfaces.nsIDialogParamBlock );
then gets the message text in the alert() call like this:
var messageText = param.GetString( 0 );
However dumping the messageText to the console shows that the "\n"s have been
converted to "n"s, and the code that follows this does not work, because it
assumes the string contains "\n". So it seems that something in the back end is
converting \n to n when it shouldn't be, resulting in the improper display.
Comment 2•25 years ago
|
||
*** This bug has been marked as a duplicate of 21418 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 3•25 years ago
|
||
verified dupe of bug 21418 Support "\n" or "<br>" in string bundle strings to
force line breaks in dialog text
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•