org.owasp.encoder.Encode.forXml()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中org.owasp.encoder.Encode.forXml()方法的一些代码示例,展示了Encode.forXml()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Encode.forXml()方法的具体详情如下:
包路径:org.owasp.encoder.Encode
类名称:Encode
方法名:forXml

Encode.forXml介绍

[英]See #forXml(String) for description of encoding. This version writes directly to a Writer without an intervening string.
[中]有关编码的说明,请参见#forXml(字符串)。此版本直接写入写入程序,无需插入字符串。

代码示例

代码示例来源:origin: primefaces/primefaces

/**
 * @see Encode#forXml(String)
 */
public static String forXml(String input) {
  return Encode.forXml(input);
}

代码示例来源:origin: pentaho/pentaho-kettle

value.append( Encode.forXml( tag ) );
 value.append( " " ).append( Encode.forXml( attributes[i] ) ).append( "=\"" ).append(
  Encode.forXmlAttribute( attributes[i + 1] ) ).append( "\" " );
 value.append( Encode.forXml( val ) );
 value.append( Encode.forXml( tag ) );
 value.append( '>' );
} else {

代码示例来源:origin: find-sec-bugs/find-sec-bugs

public static void forHtml(Writer out, String input) throws IOException {
  forXml(out, input);
}

代码示例来源:origin: find-sec-bugs/find-sec-bugs

public static String forHtml(String input) {
  return forXml(input);
}

代码示例来源:origin: pentaho/pentaho-kettle

public static void appendReplacedChars( StringBuilder value, String string ) {
 value.append( Encode.forXml( string ) );
}

代码示例来源:origin: openmrs/openmrs-core

/**
 * Encodes for XML and XHTML.
 *
 * @param s
 * @return Encoded String
 */
public static String encodeForXml(String s) {
  return Encode.forXml(s);
}

代码示例来源:origin: OWASP/owasp-java-encoder

/**
 * See {@link #forHtml(String)} for description of encoding.  This
 * version writes directly to a Writer without an intervening string.
 *
 * @param out where to write encoded output
 * @param input the input string to encode
 * @throws IOException if thrown by writer
 */
public static void forHtml(Writer out, String input) throws IOException {
  forXml(out, input);
}

代码示例来源:origin: com.strategicgains/Syntaxe

@Override
  public String encode(String input)
  {
    return Encode.forXml(input);
  }
}

代码示例来源:origin: org.owasp.encoder/encoder

/**
 * See {@link #forHtml(String)} for description of encoding.  This
 * version writes directly to a Writer without an intervening string.
 *
 * @param out where to write encoded output
 * @param input the input string to encode
 * @throws IOException if thrown by writer
 */
public static void forHtml(Writer out, String input) throws IOException {
  forXml(out, input);
}

代码示例来源:origin: GeoWebCache/geowebcache

public OWSException(int httpCode, String exceptionCode, String locator, String exceptionText) {
  this.httpCode = httpCode;
  this.exceptionCode = Encode.forXml(exceptionCode);
  this.locator = Encode.forXml(locator);
  this.exceptionText = Encode.forXml(exceptionText);
}

代码示例来源:origin: org.owasp.encoder/encoder-esapi

/** {@inheritDoc} */
public String encodeForXML(String s) {
  return Encode.forXml(s);
}

代码示例来源:origin: com.h3xstream.findsecbugs/findsecbugs-plugin-deps

public static String forHtml(String input) {
  return forXml(input);
}

代码示例来源:origin: OWASP/owasp-java-encoder

/** {@inheritDoc} */
public String encodeForXML(String s) {
  return Encode.forXml(s);
}

代码示例来源:origin: com.h3xstream.findsecbugs/findsecbugs-plugin-deps

public static void forHtml(Writer out, String input) throws IOException {
  forXml(out, input);
}

代码示例来源:origin: OWASP/owasp-java-encoder

return forXml(input);

代码示例来源:origin: org.owasp.encoder/encoder

return forXml(input);

代码示例来源:origin: OWASP/owasp-java-encoder

@Override
  public void doTag() throws JspException, IOException {
    Encode.forXml(getJspContext().getOut(), _value);
  }
}

代码示例来源:origin: org.owasp.encoder/encoder-jsp

@Override
  public void doTag() throws JspException, IOException {
    Encode.forXml(getJspContext().getOut(), _value);
  }
}

代码示例来源:origin: GeoWebCache/geowebcache

private boolean isXmlEncoded(OWSException exception) throws Exception {
    // We should find the text to test back as an encoded string.
    String text = exception.toString();
    String encoded = Encode.forXml(textToEncode);
    return text.contains(encoded);
  }
}

相关文章