character ' is not encoded in Copy Link
Categories
(Firefox :: Menus, defect)
Tracking
()
People
(Reporter: 15063662, Unassigned)
Details
Attachments
(1 file)
108.10 KB,
image/gif
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
Steps to reproduce:
On left menu of the page https://en.wikipedia.org/wiki/Laplace%27s_method
<a class="vector-toc-link" href="#Laplace's_method_generalization:_Median-point_approximation">
<div class="vector-toc-text">
<span class="vector-toc-numb">6</span>Laplace's method generalization: Median-point approximation</div>
</a>
the URL contains '
character
Right click the link and execute Copy link
Actual results:
' character is not encoded (but copying from the address bar, it will be encoded to %27
)
Expected results:
It should be encoded to %27
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 2•2 years ago
|
||
I actually can't seem reproduce this on Windows. 15063662, what is the exact page that you're copying from in the animated GIF? Also, do you have any add-ons that might be adding to or augmenting the behaviour of the context menu?
(In reply to Mike Conley (:mconley) (:⚙️) from comment #2)
I actually can't seem reproduce this on Windows. 15063662, what is the exact page that you're copying from in the animated GIF? Also, do you have any add-ons that might be adding to or augmenting the behaviour of the context menu?
Hello, I was copying on this page: https://math.stackexchange.com/questions/1128367
There are two links containing '
<a href="http://en.wikipedia.org/wiki/Wallis'_integrals" rel="nofollow">Wallis' integrals</a>
and
<a href="http://en.wikipedia.org/wiki/Liouville's_theorem_(differential_algebra)" rel="nofollow">Liouville's theorem</a>
When I click "copy link" in the menu, the result is
http://en.wikipedia.org/wiki/Wallis'_integrals
http://en.wikipedia.org/wiki/Liouville's_theorem_(differential_algebra)
' character is not encoded.
Perhaps this is not a bug? Chrome also doesn't encode ' to %27 if the link itself contains '
Comment 5•2 years ago
|
||
Hey smaug, maybe you know, or maybe you know who we can ask: is there some kind of web-specification behaviour that we should follow when copying URLs with these kinds of characters? Or are Firefox and Chrome doing the right thing here?
Comment 6•2 years ago
|
||
I don't think there is any spec, but hsivonen might have some opinion on the behavior.
Comment 7•2 years ago
|
||
AFAICT, the relevant part of the spec is https://url.spec.whatwg.org/#path-state . We end up in the "Otherwise" step. Substep 1. ' is a URL code point, so there's no error in substep 1. ' is not %, so we skip substep 2. Therefore, in step 3, we UTF-8 percent encode ' with path percent-encode set. Since ' is not in the path percent-encode set, it passes through without percent encoding.
AFAICT, there's no bug here
but copying from the address bar, it will be encoded to %27)
I don't see this on Linux. Following the link from comment 1, pressing ctrl-l, ctrl-c, and pasting into gedit shows unescaped '.
Description
•