New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
website: playground Firefox %25 in URL bug #1770
Labels
Milestone
Comments
Owner changed to @adg. Status changed to Accepted. |
This this a Firefox bug? Does look like it can be worked around (in both Chrome and Firefox) by keeping # as # in the URL: This works in both browsers: http://golang.org/doc/play/#package%20main%0Afunc%20main()%20%7B%0A%09println(%22#%22)%0A%7D%0A |
# is not the problem; % is. This URL: http://golang.org/doc/play/#package%20main%0Afunc%20main()%20%7B%0A%09println(%22%25%22)%0A%7D%0A works in Chrome, not in Firefox. |
A workaround for anyone also having the problem with FF. Not nice, just works. http://golang.org/doc/play/#package%20main%0Afunc%20main%28%29%20{%0A%09println%28%22\x25%22%29%0A}%0A BTW: If there is some way for me to help with solving this issue, I'l be happy to volunteer. |
Comment 7 by disposaboy@dby.me: Unfortunately this is an issue(probably a bug in at least Gecko based browsers) with the behaviour of decodeURIComponent in that it appears to decodes %25 then borks at the possibly unexpected % sign. I don't have IE handy to test (and I have no reason to expect it to break there) but a possible workaround is to just use escape/unescape as opposed to encodeURIComponent/decodeURIComponent. AFAICT that pair simply works. |
// Called directly by OS as signal handler. #pragma textflag 7 before the definition of runtime.sigignore in both freebsd/386/signal.c and freebsd/amd64/signal.c. This is a difference compared to the Darwin port because on Darwin the function gets called via sigtramp. On FreeBSD it is being given to the signal handler directly, so it cannot be a typical Go stack-checking function. |
I found the error. It is indeed a bug in Firefox when retrieving the hash through window.location.hash. I found a cross-platform solution for the same purpose. So to fix the issue, we need to replace line 163 in playground.js by the following : var hash = location.href.split("#")[1] || ""; |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: