Closed
Bug 261884
Opened 20 years ago
Closed 12 years ago
Null Javascript characters show in textbox and can't use indexOf to find them.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: barryman_5000, Unassigned)
References
()
Details
Attachments
(1 file)
264 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040920 Firefox/0.10
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040920 Firefox/0.10
When appending the null string "\0\0\0\0\0\0\0\0" to a string it is supposed to
make null characters. Well I can do a charCodeAt and the extra characters will
have a value of 0 but I can't do an indexOf("\0\0\0\0\0\0\0\0") to find the
first occurence of the null characters so that I can use a substr to remove them
from showing up in the text box.
Reproducible: Always
Steps to Reproduce:
1.Type in some string that isn't a power of 8 @ http://pwstudios.com/des.html.
2.Press encrypt.
3.Press decrypt.
Actual Results:
Watch the null characters party at the end of your string!
Expected Results:
Well, either omit null characters or allow me to find them and remove them
myself via a indexOf or something.
Comment 1•20 years ago
|
||
So there's no JS engine bug -- but where is the bug? Not in Firefox's website!
/be
Comment 2•20 years ago
|
||
Need a minimal testcase. Probably DOM .
/be
Assignee: bugs → general
Status: UNCONFIRMED → NEW
Component: Web Site → DOM: Level 0
Ever confirmed: true
Product: Firefox → Browser
Version: unspecified → Trunk
Comment 3•20 years ago
|
||
The JS in http://pwstudios.com/des.js has no calls to indexOf....
data:text/html,<a onclick='z()'>click me</a>%0d%0a<script>function q(a)
{window.status+='\t'+a;} function z(){var a='aaa\0\0\0'; q(a.indexOf('\0\0\0'));
var aa=document.getElementById('aa'); aa.value=a; q(aa.value.indexOf('\0\0\0'));
}</script><form id='f'><input id='aa'>
wfm
personally i'd probably use .replace(/\0+$/,'') ....
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: general
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•