本文整理了Java中org.sakaiproject.util.Web.escapeHtml()
方法的一些代码示例,展示了Web.escapeHtml()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Web.escapeHtml()
方法的具体详情如下:
包路径:org.sakaiproject.util.Web
类名称:Web
方法名:escapeHtml
[英]Escape a plaintext string so that it can be output as part of an HTML document. Amperstand, greater-than, less-than, newlines, etc, will be escaped so that they display (instead of being interpreted as formatting).
[中]转义纯文本字符串,以便将其作为HTML文档的一部分输出。将转义符、大于、小于、换行符等,以便它们显示(而不是解释为格式)。
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
/** HTML escape and store the site's full description. */
protected void escapeDescription()
{
m_htmlDescription = Web.escapeHtml(m_description);
}
代码示例来源:origin: org.sakaiproject/sakai-chat-impl
retvalBuf.append( Web.escapeJsQuoted(Web.escapeHtml(displayName)) );
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
/** HTML escape and store the site's short description. */
protected void escapeShortDescription()
{
m_htmlShortDescription = Web.escapeHtml(m_shortDescription);
}
代码示例来源:origin: org.sakaiproject.portal/sakai-portal-render-impl
public String getTitle() throws ToolRenderException
{
return Web.escapeHtml(toolConfiguration.getTitle());
}
代码示例来源:origin: sakaiproject/sakai
/**
* Assigns a value from one map to another - applying an HMTL filter to the value
*
* destMap[destKey] = sourceMap[sourceKey];
*
* @param destMap
* The Map to add the key/value pair to.
* @param destKey
* The key to use in the destination map.
* @param sourceMap
* The Map to add the key/value pairs from
* @param sourceKey
* The key to use from the source map.
* @return true if there were keys copied
*/
public static boolean copyHtml(Map destMap, String destKey, Map sourceMap, String sourceKey)
{
if ( destMap == null || sourceMap == null || sourceMap.isEmpty() ) return false;
try {
String s = (String) sourceMap.get(sourceKey);
if ( s == null ) return false;
destMap.put(destKey,Web.escapeHtml(s));
return true;
} catch (Exception t) { // Not a string
return false;
}
}
}
代码示例来源:origin: sakaiproject/sakai
protected String htmlContent(Event event) {
return Web.encodeUrlsAsHtml(Web.escapeHtml(plainTextContent(event),true));
}
代码示例来源:origin: org.sakaiproject.portal/sakai-portal-render-impl
final String titleString = Web.escapeHtml(configuration.getTitle());
String toolUrl = ServerConfigurationService.getToolUrl() + "/"
+ Web.escapeUrl(configuration.getId());
sb.append("sakai_action=").append(Web.escapeHtml(sakaiAction));
代码示例来源:origin: sakaiproject/sakai
public String getUserSpecificSiteTitle(Site site, boolean truncated, boolean escaped, List<String> siteProviders)
{
String retVal = SiteService.getUserSpecificSiteTitle( site, UserDirectoryService.getCurrentUser().getId(), siteProviders );
if( truncated )
{
retVal = FormattedText.makeShortenedText( retVal, null, null, null );
}
if( escaped )
{
retVal = Web.escapeHtml( retVal );
}
return retVal;
}
代码示例来源:origin: org.sakaiproject.portal/sakai-portal-impl
public String getUserSpecificSiteTitle(Site site, boolean truncated, boolean escaped, List<String> siteProviders)
{
String retVal = SiteService.getUserSpecificSiteTitle( site, UserDirectoryService.getCurrentUser().getId(), siteProviders );
if( truncated )
{
retVal = FormattedText.makeShortenedText( retVal, null, null, null );
}
if( escaped )
{
retVal = Web.escapeHtml( retVal );
}
return retVal;
}
代码示例来源:origin: org.sakaiproject.portal/sakai-portal-render-impl
public String getTitle() throws ToolRenderException
{
if ( bufferedException == null ) {
try
{
renderResponse();
return Web.escapeHtml(PortletStateAccess.getPortletState(req, window.getId().getStringId())
.getTitle());
}
catch(Exception e)
{
bufferedException = e;
}
}
return bufferedException.toString();
}
代码示例来源:origin: org.sakaiproject/sakai-chat-impl
String body = Web.escapeHtml(message.getBody());
代码示例来源:origin: sakaiproject/sakai
m.put("shortDescription", Web.escapeHtml(shortDesc_trimmed));
代码示例来源:origin: org.sakaiproject.portal/sakai-portal-impl
m.put("shortDescription", Web.escapeHtml(shortDesc_trimmed));
代码示例来源:origin: sakaiproject/sakai
m.put("ispopup", Boolean.valueOf(p.isPopUp()));
m.put("pagePopupUrl", pagePopupUrl);
m.put("pageTitle", Web.escapeHtml(p.getTitle()));
m.put("jsPageTitle", Web.escapeJavascript(p.getTitle()));
m.put("pageId", Web.escapeUrl(p.getId()));
m.put("jsToolId", Web.escapeJavascript(placement.getId()));
m.put("toolRegistryId", placement.getToolId());
m.put("toolTitle", Web.escapeHtml(placement.getTitle()));
m.put("jsToolTitle", Web.escapeJavascript(placement.getTitle()));
m.put("toolrefUrl", toolrefUrl);
代码示例来源:origin: sakaiproject/sakai
String titleString = Web.escapeHtml(placement.getTitle());
String toolId = Web.escapeHtml(placement.getToolId());
代码示例来源:origin: org.sakaiproject.portal/sakai-portal-impl
String titleString = Web.escapeHtml(placement.getTitle());
String toolId = Web.escapeHtml(placement.getToolId());
代码示例来源:origin: sakaiproject/sakai
rcontext.put("shortDescription", Web.escapeHtml(site.getShortDescription()));
代码示例来源:origin: org.sakaiproject.portal/sakai-portal-impl
rcontext.put("shortDescription", Web.escapeHtml(site.getShortDescription()));
代码示例来源:origin: sakaiproject/sakai
rcontext.put("pageTitle", Web.escapeHtml(title));
rcontext.put("pageScriptPath", PortalUtils.getScriptPath());
rcontext.put("pageWebjarsPath", PortalUtils.getWebjarsPath());
代码示例来源:origin: org.sakaiproject.portal/sakai-portal-impl
rcontext.put("pageTitle", Web.escapeHtml(title));
rcontext.put("pageScriptPath", PortalUtils.getScriptPath());
rcontext.put("pageWebjarsPath", PortalUtils.getWebjarsPath());
内容来源于网络,如有侵权,请联系作者删除!