Commit 527e5154 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Improved formatting of escaped content.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3387 b35dd754-fafc-0310-a699-88a17e54d16e
parent f69e261d
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<p> <p>
<fmt:message key="session.details.info"> <fmt:message key="session.details.info">
<fmt:param value="<%= "<b>"+URLEncoder.encode(address.toString(), "UTF-8")+"</b>" %>" /> <fmt:param value="<%= "<b>" + StringUtils.escapeForXML(address.toString()) + "</b>" %>" />
<fmt:param value="<%= address.getNode() == null ? "" : "<b>"+address.getNode()+"</b>" %>" /> <fmt:param value="<%= address.getNode() == null ? "" : "<b>"+address.getNode()+"</b>" %>" />
</fmt:message> </fmt:message>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<fmt:message key="session.details.session_id" /> <fmt:message key="session.details.session_id" />
</td> </td>
<td> <td>
<%= URLEncoder.encode(address.toString(), "UTF-8") %> <%= StringUtils.escapeForXML(address.toString()) %>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -108,12 +108,12 @@ ...@@ -108,12 +108,12 @@
<% String n = address.getNode(); %> <% String n = address.getNode(); %>
<% if (n == null || "".equals(n)) { %> <% if (n == null || "".equals(n)) { %>
<i> <fmt:message key="session.details.anonymous" /> </i> - <%= address.getResource()==null?"":URLEncoder.encode(address.getResource(), "UTF-8") %> <i> <fmt:message key="session.details.anonymous" /> </i> - <%= address.getResource()==null?"":StringUtils.escapeForXML(address.getResource()) %>
<% } else { %> <% } else { %>
<a href="user-properties.jsp?username=<%= n %>"><%= n %></a> <a href="user-properties.jsp?username=<%= URLEncoder.encode(n, "UTF-8") %>"><%= n %></a>
- <%= address.getResource()==null?"":URLEncoder.encode(address.getResource(), "UTF-8") %> - <%= address.getResource()==null?"":StringUtils.escapeForXML(address.getResource()) %>
<% } %> <% } %>
</td> </td>
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
Presence.Show show = currentSess.getPresence().getShow(); Presence.Show show = currentSess.getPresence().getShow();
String statusTxt = currentSess.getPresence().getStatus(); String statusTxt = currentSess.getPresence().getStatus();
if (statusTxt != null) { if (statusTxt != null) {
statusTxt = " -- " + URLEncoder.encode(statusTxt, "UTF-8"); statusTxt = " -- " + StringUtils.escapeForXML(statusTxt);
} }
else { else {
statusTxt = ""; statusTxt = "";
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<%@ page import="org.jivesoftware.wildfire.Session, <%@ page import="org.jivesoftware.wildfire.Session,
org.xmpp.packet.Presence, org.xmpp.packet.Presence,
java.net.URLEncoder, java.net.URLEncoder,
org.jivesoftware.util.LocaleUtils"%> org.jivesoftware.util.LocaleUtils,
org.jivesoftware.util.StringUtils"%>
<%-- <%--
- This page is meant to be included in other pages. It assumes 2 variables: - This page is meant to be included in other pages. It assumes 2 variables:
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
><%= ((name != null && !"".equals(name)) ? name : "<i>"+LocaleUtils.getLocalizedString("session.details.anonymous")+"</i>") %></a> ><%= ((name != null && !"".equals(name)) ? name : "<i>"+LocaleUtils.getLocalizedString("session.details.anonymous")+"</i>") %></a>
</td> </td>
<td width="15%" nowrap> <td width="15%" nowrap>
<%= URLEncoder.encode(sess.getAddress().getResource(), "UTF-8") %> <%= StringUtils.escapeForXML(sess.getAddress().getResource()) %>
</td> </td>
<td> <td>
<% int _status = sess.getStatus(); <% int _status = sess.getStatus();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment