本文整理汇总了Java中com.google.gwt.safehtml.shared.UriUtils.sanitizeUri方法的典型用法代码示例。如果您正苦于以下问题:Java UriUtils.sanitizeUri方法的具体用法?Java UriUtils.sanitizeUri怎么用?Java UriUtils.sanitizeUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.safehtml.shared.UriUtils
的用法示例。
在下文中一共展示了UriUtils.sanitizeUri方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.google.gwt.safehtml.shared.UriUtils; //导入方法依赖的package包/类
public void init(LASRequest request, String cruiseid) {
message.setVisible(false);
request.setOperation("Cruise_List", "v7");
List<Map<String, String>> c = request.getVariableConstraints();
for (Iterator cIt = c.iterator(); cIt.hasNext();) {
Map<String, String> map = (Map<String, String>) cIt.next();
String varid = map.get("varID");
if ( varid.equals(cruiseid)) {
} else {
}
}
String url = Util.getProductServer()+"?xml="+URL.encode(request.toString());
RequestBuilder sendRequest = new RequestBuilder(RequestBuilder.GET, UriUtils.sanitizeUri(url));
try {
sendRequest.sendRequest(null, iconListRequestCallback);
} catch (RequestException e) {
message.setVisible(true);
message.setHTML("Unable to icon list");
}
}
示例2: urlElement
import com.google.gwt.safehtml.shared.UriUtils; //导入方法依赖的package包/类
private static String urlElement(MDUrl url) {
// Sanitizing URL
String href = UriUtils.sanitizeUri(url.getUrl());
// "DeSanitize" custom url scheme
if (url.getUrl().startsWith("send:")) {
href = UriUtils.encodeAllowEscapes(url.getUrl());
} else {
// HotFixing url without prefix
if (!href.equals("#") && !href.contains("://")) {
href = "http://" + href;
}
}
return "<a " +
"target=\"_blank\" " +
"onClick=\"window.messenger.handleLinkClick(event)\" " +
"href=\"" + href + "\">" +
SafeHtmlUtils.htmlEscape(url.getUrlTitle()) +
"</a>";
}
示例3: setAnnotationsHTMLURL
import com.google.gwt.safehtml.shared.UriUtils; //导入方法依赖的package包/类
public void setAnnotationsHTMLURL(String url) {
RequestBuilder sendRequest = new RequestBuilder(RequestBuilder.GET, UriUtils.sanitizeUri(url));
try {
sendRequest.sendRequest(null, annotationsHTMLCallback);
} catch (RequestException e) {
e.printStackTrace();
}
}