Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

HAL-1149: decode URL segments #279

Merged
merged 1 commit into from Aug 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -5,6 +5,7 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.http.client.URL;
import com.google.gwt.safehtml.client.SafeHtmlTemplates;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
Expand Down Expand Up @@ -151,7 +152,7 @@ public void onClick(ClickEvent event) {
table.addColumn(new ModelNodeColumn(new ModelNodeColumn.ValueAdapter() {
@Override
public String getValue(ModelNode model) {
return model.asString();
return URL.decodePathSegment(model.asString());
}
}), "Child Resource" );

Expand Down
Expand Up @@ -9,6 +9,7 @@
import com.google.gwt.event.logical.shared.OpenHandler;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.http.client.URL;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.user.client.ui.Button;
Expand Down Expand Up @@ -594,7 +595,7 @@ private void addChildrenNames(ModelTreeItem rootItem, List<ModelNode> modelNodes

String icon = isSingleton ? "icon-file-text-alt" : "icon-file-text-alt";
html.appendHtmlConstant("<i class='" + icon + "'></i>&nbsp;");
html.appendHtmlConstant(childName);
html.appendHtmlConstant(URL.decodePathSegment(childName));
TreeItem childItem = new ModelTreeItem(html.toSafeHtml(), childName, address, isSingleton);
childItem.addItem(new PlaceholderItem());
rootItem.addItem(childItem);
Expand Down
Expand Up @@ -2,6 +2,7 @@

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.http.client.URL;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.InlineHTML;
Expand Down Expand Up @@ -73,7 +74,7 @@ public void onClick(ClickEvent event) {

nav.add(type);
nav.add(new InlineHTML("="));
nav.add(new InlineHTML(p.getValue().asString()));
nav.add(new InlineHTML(URL.decodePathSegment(p.getValue().asString())));

// has to be last step. valid for the next iteration
parentAddress.add(p.getName(), p.getValue().asString());
Expand Down