本文整理了Java中org.apache.commons.text.StringEscapeUtils.escapeHtml3()
方法的一些代码示例,展示了StringEscapeUtils.escapeHtml3()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StringEscapeUtils.escapeHtml3()
方法的具体详情如下:
包路径:org.apache.commons.text.StringEscapeUtils
类名称:StringEscapeUtils
方法名:escapeHtml3
暂无
代码示例来源:origin: org.apache.commons/commons-text
@Test
public void testEscapeHtmlThree() {
assertNull(StringEscapeUtils.escapeHtml3(null));
assertEquals("a", StringEscapeUtils.escapeHtml3("a"));
assertEquals("<b>a", StringEscapeUtils.escapeHtml3("<b>a"));
}
代码示例来源:origin: dhis2/dhis2-core
String optionComboName = categoryOptionCombo != null ? escapeHtml3( categoryOptionCombo.getName() ) : "[ " + i18n.getString( "cat_option_combo_not_exist" ) + " ]";
append( escapeHtml3( dataElement.getDisplayName() ) ).append( " - " ).append( optionComboId ).append( " - " ).
append( optionComboName ).append( " - " ).append( dataElement.getValueType() ).append( "\"" ) : new StringBuilder();
displayValue = dataElement != null ? "value=\"[ " + escapeHtml3( dataElement.getDisplayName() ) + " " + optionComboName + " ]\"" : "[ " + i18n.getString( "data_element_not_exist" ) + " ]";
displayTitle = dataElement != null ? title.toString() : "[ " + i18n.getString( "dataelement_not_exist" ) + " ]";
DataElement dataElement = dataElementService.getDataElement( dataElementId );
displayValue = dataElement != null ? "value=\"[ " + escapeHtml3( dataElement.getDisplayName() ) + " ]\"" : "[ " + i18n.getString( "data_element_not_exist" ) + " ]";
displayTitle = dataElement != null ? "title=\"" + escapeHtml3( dataElement.getDisplayName() ) + "\"" : "[ " + i18n.getString( "data_element_not_exist" ) + " ]";
Indicator indicator = indicatorService.getIndicator( indicatorId );
displayValue = indicator != null ? "value=\"[ " + escapeHtml3( indicator.getDisplayName() ) + " ]\"" : "[ " + i18n.getString( "indicator_not_exist" ) + " ]";
displayTitle = indicator != null ? "title=\"" + escapeHtml3( indicator.getDisplayName() ) + "\"" : "[ " + i18n.getString( "indicator_not_exist" ) + " ]";
代码示例来源:origin: dhis2/dhis2-core
String titleTag = " title=\"" + escapeHtml3( dataElement.getDisplayDescription() ) + "\" ";
inputHtml = inputHtml.replaceAll( "title=\".*?\"", "" ).replace( TAG_CLOSE, titleTag + TAG_CLOSE );
内容来源于网络,如有侵权,请联系作者删除!