Commit 4973c4ed authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Encoded links.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1618 b35dd754-fafc-0310-a699-88a17e54d16e
parent 8e1b97e6
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
java.util.Iterator, java.util.Iterator,
org.jivesoftware.messenger.muc.*, org.jivesoftware.messenger.muc.*,
org.xmpp.packet.IQ, org.xmpp.packet.IQ,
org.dom4j.Element" org.dom4j.Element,
java.net.URLEncoder"
errorPage="error.jsp" errorPage="error.jsp"
%> %>
...@@ -72,7 +73,7 @@ ...@@ -72,7 +73,7 @@
room.getIQAdminHandler().handleIQ(iq, room.getRole()); room.getIQAdminHandler().handleIQ(iq, room.getRole());
} }
// done, return // done, return
response.sendRedirect("muc-room-affiliations.jsp?addsuccess=true&roomName="+roomName); response.sendRedirect("muc-room-affiliations.jsp?addsuccess=true&roomName="+URLEncoder.encode(roomName, "UTF-8"));
return; return;
} }
catch (ConflictException e) { catch (ConflictException e) {
...@@ -95,7 +96,7 @@ ...@@ -95,7 +96,7 @@
// Send the IQ packet that will modify the room's configuration // Send the IQ packet that will modify the room's configuration
room.getIQOwnerHandler().handleIQ(iq, room.getRole()); room.getIQOwnerHandler().handleIQ(iq, room.getRole());
// done, return // done, return
response.sendRedirect("muc-room-affiliations.jsp?deletesuccess=true&roomName="+roomName); response.sendRedirect("muc-room-affiliations.jsp?deletesuccess=true&roomName="+URLEncoder.encode(roomName, "UTF-8"));
return; return;
} }
catch (ConflictException e) { catch (ConflictException e) {
...@@ -109,16 +110,16 @@ ...@@ -109,16 +110,16 @@
String title = LocaleUtils.getLocalizedString("muc.room.affiliations.title"); String title = LocaleUtils.getLocalizedString("muc.room.affiliations.title");
pageinfo.setTitle(title); pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(LocaleUtils.getLocalizedString("global.main"), "index.jsp")); pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(LocaleUtils.getLocalizedString("global.main"), "index.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-room-affiliations.jsp?roomName="+roomName)); pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-room-affiliations.jsp?roomName="+URLEncoder.encode(roomName, "UTF-8")));
pageinfo.setSubPageID("muc-room-affiliations"); pageinfo.setSubPageID("muc-room-affiliations");
pageinfo.setExtraParams("roomName="+roomName); pageinfo.setExtraParams("roomName="+URLEncoder.encode(roomName, "UTF-8"));
%> %>
<jsp:include page="top.jsp" flush="true" /> <jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" /> <jsp:include page="title.jsp" flush="true" />
<p> <p>
<fmt:message key="muc.room.affiliations.info" /> <fmt:message key="muc.room.affiliations.info" />
<b><a href="muc-room-edit-form.jsp?roomName=<%= room.getName() %>"><%= room.getName() %></a></b>. <b><a href="muc-room-edit-form.jsp?roomName=<%= URLEncoder.encode(room.getName(), "UTF-8") %>"><%= room.getName() %></a></b>.
<fmt:message key="muc.room.affiliations.info_detail" /> <fmt:message key="muc.room.affiliations.info_detail" />
</p> </p>
...@@ -218,7 +219,7 @@ ...@@ -218,7 +219,7 @@
<%= user %> <%= user %>
</td> </td>
<td width="1%" align="center"> <td width="1%" align="center">
<a href="muc-room-affiliations.jsp?roomName=<%= roomName %>&userJID=<%= user %>&delete=true&affiliation=owner" <a href="muc-room-affiliations.jsp?roomName=<%= URLEncoder.encode(roomName, "UTF-8") %>&userJID=<%= user %>&delete=true&affiliation=owner"
title="<fmt:message key="global.click_delete" />" title="<fmt:message key="global.click_delete" />"
onclick="return confirm('<fmt:message key="muc.room.affiliations.confirm_removed" />');" onclick="return confirm('<fmt:message key="muc.room.affiliations.confirm_removed" />');"
><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a> ><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a>
...@@ -246,7 +247,7 @@ ...@@ -246,7 +247,7 @@
<%= user %> <%= user %>
</td> </td>
<td width="1%" align="center"> <td width="1%" align="center">
<a href="muc-room-affiliations.jsp?roomName=<%= roomName %>&userJID=<%= user %>&delete=true&affiliation=admin" <a href="muc-room-affiliations.jsp?roomName=<%= URLEncoder.encode(roomName, "UTF-8") %>&userJID=<%= user %>&delete=true&affiliation=admin"
title="<fmt:message key="global.click_delete" />" title="<fmt:message key="global.click_delete" />"
onclick="return confirm('<fmt:message key="muc.room.affiliations.confirm_removed" />');" onclick="return confirm('<fmt:message key="muc.room.affiliations.confirm_removed" />');"
><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a> ><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a>
...@@ -276,7 +277,7 @@ ...@@ -276,7 +277,7 @@
<%= user %><%= nickname %> <%= user %><%= nickname %>
</td> </td>
<td width="1%" align="center"> <td width="1%" align="center">
<a href="muc-room-affiliations.jsp?roomName=<%= roomName %>&userJID=<%= user %>&delete=true&affiliation=member" <a href="muc-room-affiliations.jsp?roomName=<%= URLEncoder.encode(roomName, "UTF-8") %>&userJID=<%= user %>&delete=true&affiliation=member"
title="<fmt:message key="global.click_delete" />" title="<fmt:message key="global.click_delete" />"
onclick="return confirm('<fmt:message key="muc.room.affiliations.confirm_removed" />');" onclick="return confirm('<fmt:message key="muc.room.affiliations.confirm_removed" />');"
><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a> ><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a>
...@@ -304,7 +305,7 @@ ...@@ -304,7 +305,7 @@
<%= user %> <%= user %>
</td> </td>
<td width="1%" align="center"> <td width="1%" align="center">
<a href="muc-room-affiliations.jsp?roomName=<%= roomName %>&userJID=<%= user %>&delete=true&affiliation=outcast" <a href="muc-room-affiliations.jsp?roomName=<%= URLEncoder.encode(roomName, "UTF-8") %>&userJID=<%= user %>&delete=true&affiliation=outcast"
title="<fmt:message key="global.click_delete" />" title="<fmt:message key="global.click_delete" />"
onclick="return confirm('<fmt:message key="muc.room.affiliations.confirm_removed" />');" onclick="return confirm('<fmt:message key="muc.room.affiliations.confirm_removed" />');"
><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a> ><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a>
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
<%@ page import="org.jivesoftware.util.*, <%@ page import="org.jivesoftware.util.*,
org.jivesoftware.admin.*, org.jivesoftware.admin.*,
org.jivesoftware.messenger.muc.MUCRoom" org.jivesoftware.messenger.muc.MUCRoom,
java.net.URLEncoder"
errorPage="error.jsp" errorPage="error.jsp"
%> %>
...@@ -54,16 +55,16 @@ ...@@ -54,16 +55,16 @@
String title = LocaleUtils.getLocalizedString("muc.room.delete.title"); String title = LocaleUtils.getLocalizedString("muc.room.delete.title");
pageinfo.setTitle(title); pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(LocaleUtils.getLocalizedString("global.main"), "index.jsp")); pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(LocaleUtils.getLocalizedString("global.main"), "index.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-room-delete.jsp?roomName="+roomName)); pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-room-delete.jsp?roomName="+URLEncoder.encode(roomName, "UTF-8")));
pageinfo.setSubPageID("muc-room-delete"); pageinfo.setSubPageID("muc-room-delete");
pageinfo.setExtraParams("roomName="+roomName); pageinfo.setExtraParams("roomName="+URLEncoder.encode(roomName, "UTF-8"));
%> %>
<jsp:include page="top.jsp" flush="true" /> <jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" /> <jsp:include page="title.jsp" flush="true" />
<p> <p>
<fmt:message key="muc.room.delete.info" /> <fmt:message key="muc.room.delete.info" />
<b><a href="muc-room-edit-form.jsp?roomName=<%= room.getName() %>"><%= room.getName() %></a></b> <b><a href="muc-room-edit-form.jsp?roomName=<%= URLEncoder.encode(room.getName(), "UTF-8") %>"><%= room.getName() %></a></b>
<fmt:message key="muc.room.delete.detail" /> <fmt:message key="muc.room.delete.detail" />
</p> </p>
......
...@@ -17,15 +17,14 @@ ...@@ -17,15 +17,14 @@
org.jivesoftware.messenger.forms.spi.*, org.jivesoftware.messenger.forms.spi.*,
org.jivesoftware.messenger.forms.*, org.jivesoftware.messenger.forms.*,
org.dom4j.Element, org.dom4j.Element,
org.dom4j.DocumentHelper,
org.dom4j.QName,
org.xmpp.packet.IQ, org.xmpp.packet.IQ,
org.xmpp.packet.Message, org.xmpp.packet.Message,
org.xmpp.packet.JID, org.xmpp.packet.JID,
org.jivesoftware.messenger.auth.UnauthorizedException, org.jivesoftware.messenger.auth.UnauthorizedException,
org.jivesoftware.util.LocaleUtils, org.jivesoftware.util.LocaleUtils,
org.jivesoftware.stringprep.Stringprep, org.jivesoftware.stringprep.Stringprep,
org.jivesoftware.stringprep.StringprepException" org.jivesoftware.stringprep.StringprepException,
java.net.URLEncoder"
errorPage="error.jsp" errorPage="error.jsp"
%> %>
...@@ -242,10 +241,10 @@ ...@@ -242,10 +241,10 @@
// Changes good, so redirect // Changes good, so redirect
String params = ""; String params = "";
if (create) { if (create) {
params = "addsuccess=true&roomName=" + roomName; params = "addsuccess=true&roomName=" + URLEncoder.encode(roomName, "UTF-8");
} }
else { else {
params = "success=true&roomName=" + roomName; params = "success=true&roomName=" + URLEncoder.encode(roomName, "UTF-8");
} }
response.sendRedirect("muc-room-edit-form.jsp?" + params); response.sendRedirect("muc-room-edit-form.jsp?" + params);
return; return;
...@@ -285,6 +284,7 @@ ...@@ -285,6 +284,7 @@
} }
// Formatter for dates // Formatter for dates
DateFormat dateFormatter = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT); DateFormat dateFormatter = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);
roomName = roomName == null ? "" : roomName;
%> %>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" /> <jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
...@@ -297,10 +297,10 @@ ...@@ -297,10 +297,10 @@
pageinfo.setPageID("muc-room-create"); pageinfo.setPageID("muc-room-create");
} }
else { else {
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-room-edit-form.jsp?roomName="+roomName)); pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "muc-room-edit-form.jsp?roomName="+URLEncoder.encode(roomName, "UTF-8")));
pageinfo.setSubPageID("muc-room-edit-form"); pageinfo.setSubPageID("muc-room-edit-form");
} }
pageinfo.setExtraParams("roomName="+roomName+"&create="+create); pageinfo.setExtraParams("roomName="+URLEncoder.encode(roomName, "UTF-8")+"&create="+create);
%> %>
<jsp:include page="top.jsp" flush="true" /> <jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" /> <jsp:include page="title.jsp" flush="true" />
...@@ -406,7 +406,7 @@ ...@@ -406,7 +406,7 @@
<% if (create) { %> <% if (create) { %>
<tr> <tr>
<td><fmt:message key="muc.room.edit.form.room_id" />:</td> <td><fmt:message key="muc.room.edit.form.room_id" />:</td>
<td><input type="text" name="roomName" value="<%= roomName != null ? roomName : ""%>"> @<%= webManager.getMultiUserChatServer().getServiceDomain()%> <td><input type="text" name="roomName" value="<%= roomName %>"> @<%= webManager.getMultiUserChatServer().getServiceDomain()%>
</td> </td>
</tr> </tr>
<% } %> <% } %>
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
java.text.DateFormat, java.text.DateFormat,
org.jivesoftware.admin.*, org.jivesoftware.admin.*,
org.jivesoftware.messenger.muc.MUCRoom, org.jivesoftware.messenger.muc.MUCRoom,
java.util.*" java.util.*,
java.net.URLEncoder"
errorPage="error.jsp" errorPage="error.jsp"
%> %>
...@@ -165,12 +166,12 @@ ...@@ -165,12 +166,12 @@
<%= room.getOccupantsCount() %> / <%= room.getMaxUsers() %> <%= room.getOccupantsCount() %> / <%= room.getMaxUsers() %>
</td> </td>
<td width="1%" align="center"> <td width="1%" align="center">
<a href="muc-room-edit-form.jsp?roomName=<%= room.getName() %>" <a href="muc-room-edit-form.jsp?roomName=<%= URLEncoder.encode(room.getName(), "UTF-8") %>"
title="<fmt:message key="global.click_edit" />" title="<fmt:message key="global.click_edit" />"
><img src="images/edit-16x16.gif" width="17" height="17" border="0"></a> ><img src="images/edit-16x16.gif" width="17" height="17" border="0"></a>
</td> </td>
<td width="1%" align="center" style="border-right:1px #ccc solid;"> <td width="1%" align="center" style="border-right:1px #ccc solid;">
<a href="muc-room-delete.jsp?roomName=<%= room.getName() %>" <a href="muc-room-delete.jsp?roomName=<%= URLEncoder.encode(room.getName(), "UTF-8") %>"
title="<fmt:message key="global.click_delete" />" title="<fmt:message key="global.click_delete" />"
><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a> ><img src="images/delete-16x16.gif" width="16" height="16" border="0"></a>
</td> </td>
......
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