URL-encode spaces in share link

This commit is contained in:
Arne Keller 2021-03-08 11:04:30 +01:00
parent 3f07a6d234
commit 8d6782793e

View File

@ -99,7 +99,7 @@ public class TypeInferenceView extends VerticalLayout
@Override
public void shareButton() {
UI.getCurrent().getPage().executeJs("return decodeURI(window.location.href)").then(url ->
new ShareDialog(url.asString(), lc.getTree()).open()
new ShareDialog(url.asString().replace(" ", "%20"), lc.getTree()).open()
);
}