Closed
Bug 148178
Opened 23 years ago
Closed 5 years ago
prompt does not support line breaks and other special characters
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: chris, Unassigned)
References
()
Details
take any document with content and type in the url bar javascript: prompt
("innerHTML",document.body.innerHTML), the usual result is an empty field
similarly if you pass a Javascript string with new line characters etc
e.g. 'hello\nhow are you?\n good bye' you only get the first line in the prompt
neither IE nor Netscape 4 behaved like this and it is inconvenient for
development as well as some applications (that might produce data to be copy
and pasted into a text editor etc)
as a side note IE has the nice feature of delivering the text selected for easy
copying and pasting of large strings
Comment 1•23 years ago
|
||
Browser, not engine ---> DOM Level 0. Confirming reported behavior.
I tried this in NN4.7, IE6, and Mozilla trunk binary 20020520xx on WinNT:
javascript: prompt("test",'hello\nhow are you?\n good bye')
In NN4.7 and IE6, each '\n' was replaced with some type of pipe symbol,
and we could see the whole message in the input line of the prompt.
In Moz, however, each '\n' is expressed literally as a linefeed,
so we only end up seeint 'hello' in the input line of the prompt
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
Updated•16 years ago
|
Assignee: general → nobody
QA Contact: desale → general
Comment 3•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•