Closed
Bug 694174
Opened 14 years ago
Closed 14 years ago
Inconsistent use of "canonical" URL
Categories
(Mozilla Labs :: F1, defect)
Mozilla Labs
F1
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: markh, Unassigned)
Details
Attachments
(1 file)
Open URL http://pyfound.blogspot.com/2011/10/psf-granted-pytexas-2011-us750.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+PythonSoftwareFoundationNews+%28Python+Software+Foundation+News%29 then open F1. Also note that this page a a <link rel="canonical"> item which points at the page itself with no query params.
If you share via Twitter, you will see only the "root" of the URL in the twitter message box (ie, that canonical URL), but will see the full URL, including query params, in the "page info" area (ie, the cyan text under the message box). It is this full URL which is passed as the "link" parameter.
So the end result is that when sharing via twitter one version of the URL is used, but when shared via facebook the full URL is used. Also FWIW, Facebook itself seems to ignore all the query params - ie, even though we pass that full URL to facebook, it shows the canonical URL in the facebook UI.
The fix is probably to only deal with one version of the URL in the code - ie, once we decide to use the canonical URL, that should be the only version of the URL we actually use. If we carry around multiple copies of the URL, there is always a risk the wrong one will be chosen - and there isn't currently a use-case for multiple.
Reporter | ||
Comment 1•14 years ago
|
||
I just noticed another bad side-effect of this confusion - options.url is not currently sanitized against file:// and chrome:// URLs, but this hasn't been detected as the canonicalURL was used in most, but not all, places.
Reporter | ||
Comment 2•14 years ago
|
||
Pointer to Github pull-request
Reporter | ||
Updated•14 years ago
|
Attachment #566735 -
Flags: review?(mixedpuppy)
Updated•14 years ago
|
Attachment #566735 -
Flags: review?(mixedpuppy) → review+
Comment 3•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•