- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.zkoss.xml.XMLs.encodeText()
方法的一些代码示例,展示了XMLs.encodeText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLs.encodeText()
方法的具体详情如下:
包路径:org.zkoss.xml.XMLs
类名称:XMLs
方法名:encodeText
[英]Encodes a value such that it could be enclosed by an XML element.
Note: It is sometime improper to use CDATA if the text contains CDATA, too. The simplest way is NOT to use CDATA but encoding the string by this method.
[中]对值进行编码,使其可以被XML元素包围。
注意:如果文本也包含CDATA,则有时使用CDATA是不合适的。最简单的方法不是使用CDATA,而是使用此方法对字符串进行编码。
代码示例来源:origin: org.zkoss.zk/zk
/**
* Internal Use Only.
*/
private static String escapeParam(String param) {
return Strings.escape(XMLs.encodeText(param), Strings.ESCAPE_JAVASCRIPT);
}
代码示例来源:origin: org.zkoss.zk/zul
/** Render the crawlable text.
* If crawlable is not enabled or the text is empty, nothing is generated.
* @param text the text that is crawlable.
* If null or empty, nothing is generated.
* @since 5.0.0
*/
public static void renderCrawlableText(String text) throws IOException {
if (text != null && text.length() > 0) {
final HtmlPageRenders.RenderContext rc = HtmlPageRenders.getRenderContext(null);
if (rc != null && rc.crawlable) {
final Writer cwout = rc.temp;
cwout.write("<div>");
cwout.write(XMLs.encodeText(text));
//encode required since it might not be valid HTML
cwout.write("</div>\n");
}
}
}
代码示例来源:origin: org.zkoss.zk/zhtml
public void redraw(Writer out) throws IOException {
final Execution exec = Executions.getCurrent();
if (!HtmlPageRenders.isDirectContent(exec)) {
super.redraw(out);
return;
}
final boolean idRequired = isIdRequired();
if (idRequired) {
out.write("<span id=\"");
out.write(getUuid());
out.write("\">");
}
out.write(_encode ? XMLs.encodeText(_value) : _value);
if (idRequired)
out.write("</span>");
final TagRenderContext rc = PageRenderer.getTagRenderContext(exec);
if (rc != null) {
rc.renderBegin(this, getClientEvents(), getSpecialRendererOutput(this), false);
rc.renderEnd(this);
}
}
代码示例来源:origin: org.zkoss.zk/zk
sid = escapeParam(request.getParameter("sid"));
desktop = ((WebAppCtrl) sess.getWebApp()).getDesktopCache(sess)
.getDesktop(XMLs.encodeText(request.getParameter("dtid")));
代码示例来源:origin: org.zkoss.common/zweb
data = ("(window.zk&&zk.error?zk.error:alert)('" + XMLs.encodeText(pi) + " not found');")
.getBytes("UTF-8");
代码示例来源:origin: org.zkoss.zk/zk
} else {
String msg = wapp.getConfiguration().getTimeoutMessage(deviceType);
dtid = XMLs.encodeText(dtid); // Fix ZK-1862 security issue
if (msg != null && msg.startsWith("label:")) {
final String key;
本文整理了Java中org.zkoss.xml.XMLs.encodeText()方法的一些代码示例,展示了XMLs.encodeText()的具体用法。这些代码示例主要来源于Github/Stack
作为我的 J2EE 应用程序的电子邮件服务的一部分,我编码为 BASE64 body = MimeUtility.encodeText(orig_mail_body,"UTF-8","BASE64")
我是一名优秀的程序员,十分优秀!