Closed Bug 55468 Opened 24 years ago Closed 23 years ago

Error when click the <a href="javascript:alert('Japanese Words')">...

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 51355
Future

People

(Reporter: tato, Assigned: jst)

References

()

Details

(Keywords: intl)

Attachments

(1 file)

1. Error when click the <a href="javascript:alert('Japanese Words')">...
' is %27.
2. Error when click the <a href='javascript:alert("Japanese Words")'>...
" is %22.

and...
3. crash when click the <a href='javascript:alert("a")'>...

1.2.3 ware test on 2000100504 Win32
1.2   ware test on 2000100208 Win32/Linux/Mac
*** Bug 55466 has been marked as a duplicate of this bug. ***
i run into bug 55460 on the page.
The given URL is is a nice testcase which begins,

    "Please set the [View]-[Charctor Coding]-Japanese(Shift_JIS)"

You must change this setting in the browser before conducting the test.

 
The characters encountered by the browser are handled by the browser
embedding of the JS Engine, not the JS engine itself. Reassigning to 
Internationalization component for further triage -
Assignee: rogerl → nhotta
Component: Javascript Engine → Internationalization
QA Contact: pschwartau → teruko
These works fine in 4.75JA Win32.  
I did not see the crash/freeze. I used win32 branch commercial build ID2000101808.
I tried with and without setting charset coding to Shift_JIS.

In fact, the document specifies the charset by META tag but it is wrong
("<!META" is used instead of "<META"). After I corrected the problem no need to
set charset coding manually.
But I can reproduce the error about the alert with Japanese text.
Alert itself works with Japanese text in Shift_JIS (I will attach an example later).
The following also works (I used unicode instead of Shift_JIS).
<a href="javascript:alert('\u3042')">
But usually people does not use unicode to construct their html. So we better
support charset other than ASCII and unicode.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Adding keyword 4xp.
Keywords: 4xp
In the last attachment, I tried to show alert() itself is working with Japanese
text (in Shift_JIS).
But this bug is about <a href="javascript:alert('Japanese Words')"> is not
working with mozilla.

>The characters encountered by the browser are handled by the browser
>embedding of the JS Engine, not the JS engine itself.
Reassign to jst.
Assignee: nhotta → jst
OS: Windows NT → All
Hardware: PC → All
Target Milestone: --- → mozilla0.9
Mozilla's javascript: URL handling is a mess, we escape the non-ASCII characters
in their original charset but we never unescape them - also, the escaped URL has
no charset info in it so even if we did unescape the JS URL before executing it
there's no way to know what charset the URL is encoded as... oh my

Anyway, cleaning this up for mozilla0.9 would be nice.
This bug has been marked "future" because the original netscape engineer
workingon this is over-burdened. If you feel this is an error, that you or
another known resource will be working on this bug,or if it blocks your work in
some way -- please attach your concern to the bug for reconsideration.
Target Milestone: mozilla0.9 → Future
Keywords: intl
Can't Netscape replace overburned people? This way the work continues and it
will make a lot of Mozilla/Netscape users happy!
Netscape could probably replace 'overburned' people, but simply replacing
'over-burdened' people wouldn't really solve any problem :-)
It seems when we have non ASCII inside the string, the ' got escaped into %27
but it won't got escaped if it only have ASCII inside.

I think this bug is less important. I agree that we should future this.
*** Bug 67206 has been marked as a duplicate of this bug. ***
Simple testcase:
alert("æ" + String.fromCharCode(13) + "æ" + String.fromCharCode(13));
alert("a" + String.fromCharCode(13) + "a" + String.fromCharCode(13));
This bug will cause a trouble in most Japanese pages that is Javascript : It is 
being used. Before, this was recommended more than onclick by the specification 
of Netscape in A tag. Therefore, a problem isn't small.

Now, I am doing such bug workaround.

<script> a = 'japanese words ( non ASCII )' </script>
<a href="javascript:alert(a)">
test
</a>

(^^;;;...However, it isn't recommended to other people.


*** Bug 70873 has been marked as a duplicate of this bug. ***

*** This bug has been marked as a duplicate of 51355 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified as dup.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: