-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[share url] fixes embed links to re-add qs parameter #5900
Conversation
return $location.absUrl(); | ||
let url = $location.absUrl(); | ||
if ($scope.shareAsEmbed) { | ||
url = url.replace('?', '?embed=true&'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really isn't how we should be handling this. This fails when there isn't a query string and when there is a query string before the hash. This should instead use require('url').parse
and require('url').format
.
@spalger This is how it was being handled before the rework. |
LGTM I tested Jim's fix |
[share url] fixes embed links to re-add qs parameter
@BigFunger Where else was this merged? I don't see 5.0.0 or 4.5.0 on this pull? There's a user noting this still occurs: #5915 |
I don't believe this was backported, though the original issue was marked as a blocker for 4.4.0. |
Fixes #5897
Re-adds the embed querystring parameter when generating embed code