Closed Bug 197640 Opened 23 years ago Closed 21 years ago

What's related URLs being trimmed incorrectly

Categories

(SeaMonkey :: Sidebar, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dgynn, Assigned: shliang)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 On the What's Related sidebar, the source URL for static files is always shortened by one character. This is caused by always trimming one character from URLs with no query paramaters. This error is in this bit of code (http://lxr.mozilla.org/mozilla/source/xpfe/components/related/resources/related-panel.js#94) var nQueryPart = sUrl.indexOf('?'); if (nQueryPart != 1) { sUrl = sUrl.slice(0, nQueryPart); } The logic should check for (nQueryPart != -1). Reproducible: Always Steps to Reproduce: 1. Open the What's Related sidebar panel. 2. Navigate directly to a URL with a file name and no query string (such as http://www.mozilla.org/index.html) Actual Results: What's related will show "http://www.mozilla.org/index.htm" (without the 'l'). Also, the shortened URL is sent to Alexa. Expected Results: It should show http://www.mozilla.org/index.html.
Attached patch updated js fileSplinter Review
QA Contact: sujay → gbush
worksforme with 1.7 branch build on windows XP
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: