Closed Bug 23719 Opened 25 years ago Closed 25 years ago

Common Dialogs not inserting linebreaks properly

Categories

(SeaMonkey :: UI Design, defect, P3)

x86
Windows 95
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 21418

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.
ben, dup of 21418
Assignee: don → ben
*** This bug has been marked as a duplicate of 21418 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
verified dupe of bug 21418 Support "\n" or "<br>" in string bundle strings to force line breaks in dialog text
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.