Bug 41798 - JavaScript hyperlink mishandled, loses back page (http://www.mplug.org)
Summary: JavaScript hyperlink mishandled, loses back page (http://www.mplug.org)
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-28 05:18 UTC by warren
Modified: 2002-11-07 16:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description warren 2002-04-28 05:11:18 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kjs
Version:           KDE 3.0.0 
Severity:          normal
Installed from:    RedHat RPMs
Compiler:          gcc-2.96-110
OS:                Linux
OS/Compiler notes: Red Hat Skipjack Beta 2

Red Hat Bugzilla Report
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=63016

Description of problem:
The test cases at the URL below show this JavaScript bug in detail (page updated Tuesday April 9th 2002).

http://www.mplug.org/archive/2002/konq_space_bug/

These are test cases showing an inconsistent behavior in Konqueror's handling of an extraneous trailing space within a certain type of JavaScript link. When you click this link in Netscape or Mozilla it goes to the normal hyperlink while truncating the trailing space within that quoted string.

Test Case 1 and 2 below shows Konqueror properly handling non-JavaScript links with a trailing space within the quoted string. This behavior is identical to Netscape and Mozilla.

Test Case 3 links to a snippet of HTML from a Red Hat page that caused this Konqueror bug. View source and notice that the URL in the hyperlink and javascript are different. Netscape and Mozilla go directly to the hyperlink URL while Konqueror goes to the JavaScript URL converting the trailing space into %20 then losing knowledge of the prior visited page. (Try clicking Back it will incorrectly return to this page instead of example.html.) 

 Test Case 1 - Space after filename - Ignores Trailing Spaces
 Test Case 2 - Space after Slash Ignores Trailing Spaces
 Test Case 3 - Space after Slash with JavaScript When you click "Trigger Konqueror Bug" on example.html it changes trailing space into %20 Back button lost knowledge of the prior page.

Version-Release number of selected component (if applicable):
KDE 3.0.0-9
Red Hat Skipjack beta 2

How reproducible:
Always

Steps to Reproduce:
1. Follow directions in the test cases at that URL.
2. Be sure to click "Back" and see that it lost knowledge about the prior page.

Actual Results:
Goes to wrong URL.  Also loses knowledge of the prior page when you click "Back".

Expected Results:
That links should behave identically to other web browsers.  It shouldn't lose knowledge of the prior page when you click "Back".

(Submitted via bugs.kde.org)
Comment 1 F Lamonica 2002-09-18 18:18:20 UTC
i dunno if this is the same bug (seems to be) however 
1. start a new konqui window 
2. go to a random page (e.g. www.yahoo.com) 
3. go to www.sec.gov 
4. click on "description of forms" (second paragraph on the left) 
5. scroll down the page and click on the 'previous page' link 
6. u r returned to either the initial page or to the startup scree of 
konqueror 
take care 
Comment 2 David Faure 2002-11-07 16:17:31 UTC
Those were two different bugs. 
The initial report (konq_space_bug) was already reported in  
#40456. I just committed the fix.  
  
The comment #1 showed a severe bug in the handling of history.back. Fixed, thanks for that 
additionnal report.