From 70b7b826a0471a8f036a4f7eba4f036f0e0f6872 Mon Sep 17 00:00:00 2001 From: "Eric J. Bowersox" Date: Wed, 16 Jan 2002 23:23:57 +0000 Subject: [PATCH] removed the automatic HTML escaping from content headers and moved it out to the JSPs and other classes as needed...this may speed up things a tiny bit, but will definitely help in displaying topic names with HTML and escaped characters correctly --- scripts/comm/category.js | 6 +++--- src/com/silverwrist/venice/ui/config/RootConfig.java | 4 ++-- src/com/silverwrist/venice/ui/jsp/UtilHeaderTag.java | 6 +++--- src/com/silverwrist/venice/ui/menus/CommunityMenu.java | 2 +- web/format/comm/category.jsp | 4 ++-- web/format/comm/email.jsp | 4 ++-- web/format/comm/invite.jsp | 10 +++++++--- web/format/comm/members.jsp | 2 +- web/format/comm/profile.jsp | 4 +++- web/format/comm/set_member.jsp | 4 ++-- web/format/conf/activity_report.jsp | 10 +++++++--- web/format/conf/aliases.jsp | 6 +++--- web/format/conf/conferences.jsp | 4 ++-- web/format/conf/custom.jsp | 4 ++-- web/format/conf/email.jsp | 4 ++-- web/format/conf/find.jsp | 10 +++++++--- web/format/conf/manage_conf.jsp | 4 ++-- web/format/conf/manage_list.jsp | 4 ++-- web/format/conf/membership.jsp | 4 ++-- web/format/conf/new_topic.jsp | 4 ++-- web/format/conf/report_menu.jsp | 4 ++-- web/format/conf/topics.jsp | 4 ++-- web/format/photo_upload.jsp | 6 ++++-- 23 files changed, 65 insertions(+), 49 deletions(-) diff --git a/scripts/comm/category.js b/scripts/comm/category.js index a8806ae..bbf64f6 100644 --- a/scripts/comm/category.js +++ b/scripts/comm/category.js @@ -10,7 +10,7 @@ // // The Initial Developer of the Original Code is Eric J. Bowersox , // for Silverwrist Design Studios. Portions created by Eric J. Bowersox are -// Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. +// Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. // // Contributor(s): @@ -37,7 +37,7 @@ rc = null; if (rinput.hasParameter("set")) { // OK...they're actually setting the category here - change it and bail out catid = rinput.getParameterInt("set",-1); - if (engine.isValidCategoryID(catid)) + if (rinput.engine.isValidCategoryID(catid)) { // try setting the category ID try { // set the category ID and bounce back to the menu @@ -74,7 +74,7 @@ if (rinput.hasParameter("go")) curr_catid = rinput.getParameterInt("go",-1); else curr_catid = comm.categoryID; -if (!(engine.isValidCategoryID(curr_catid))) +if (!(rinput.engine.isValidCategoryID(curr_catid))) { // this is not a valid category ID vlib.output(new ErrorBox("Invalid Input","Invalid category ID passed to category browser.", "comm/admin_menu.js.vs?cc=" + comm.communityID)); diff --git a/src/com/silverwrist/venice/ui/config/RootConfig.java b/src/com/silverwrist/venice/ui/config/RootConfig.java index f71b231..1c6738a 100644 --- a/src/com/silverwrist/venice/ui/config/RootConfig.java +++ b/src/com/silverwrist/venice/ui/config/RootConfig.java @@ -711,9 +711,9 @@ public class RootConfig implements LinkTypes, ColorSelectors public final String getContentHeader(String primary, String secondary) { StringBuffer buf = new StringBuffer(content_hdr[0]); - buf.append(StringUtil.encodeHTML(primary)).append(content_hdr[1]); + buf.append(primary).append(content_hdr[1]); if (secondary!=null) - buf.append(content_hdr[2]).append(StringUtil.encodeHTML(secondary)).append(content_hdr[3]); + buf.append(content_hdr[2]).append(secondary).append(content_hdr[3]); buf.append(content_hdr[4]); return buf.toString(); diff --git a/src/com/silverwrist/venice/ui/jsp/UtilHeaderTag.java b/src/com/silverwrist/venice/ui/jsp/UtilHeaderTag.java index 602b5da..62db7bc 100644 --- a/src/com/silverwrist/venice/ui/jsp/UtilHeaderTag.java +++ b/src/com/silverwrist/venice/ui/jsp/UtilHeaderTag.java @@ -11,7 +11,7 @@ * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - * Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + * Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. * * Contributor(s): */ @@ -106,7 +106,7 @@ public class UtilHeaderTag extends VeniceBodyTagSupport public void setTitle(String s) { - title = s; + title = s.trim(); } // end setTitle @@ -118,7 +118,7 @@ public class UtilHeaderTag extends VeniceBodyTagSupport public void setSubtitle(String s) { - subtitle = s; + subtitle = s.trim(); } // end setSubtitle diff --git a/src/com/silverwrist/venice/ui/menus/CommunityMenu.java b/src/com/silverwrist/venice/ui/menus/CommunityMenu.java index 324a6cf..c87f6ec 100644 --- a/src/com/silverwrist/venice/ui/menus/CommunityMenu.java +++ b/src/com/silverwrist/venice/ui/menus/CommunityMenu.java @@ -57,7 +57,7 @@ public class CommunityMenu implements MenuComponent, ColorSelectors, LinkTypes } // end catch - title = ctxt.getName(); + title = StringUtil.encodeHTML(ctxt.getName()); items_list = items; cid = ctxt.getCommunityID(); show_unjoin = ctxt.canUnjoin(); diff --git a/web/format/comm/category.jsp b/web/format/comm/category.jsp index 8ae0cbe..0b3f47b 100644 --- a/web/format/comm/category.jsp +++ b/web/format/comm/category.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -25,7 +25,7 @@ %> Category browser for community "" - +
diff --git a/web/format/comm/email.jsp b/web/format/comm/email.jsp index 14bcf13..1982e23 100644 --- a/web/format/comm/email.jsp +++ b/web/format/comm/email.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -19,7 +19,7 @@ <%@ taglib uri="/tlds/community" prefix="comm" %> E-Mail to Community "" - +
diff --git a/web/format/comm/invite.jsp b/web/format/comm/invite.jsp index 4d302a3..4380365 100644 --- a/web/format/comm/invite.jsp +++ b/web/format/comm/invite.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -22,8 +22,12 @@ %> Invitation form - <%= view.getRequestAttribute("invitation.title").toString() %> - <%= view.getRequestAttribute("invitation.subtitle").toString() %> + + <%= view.getRequestAttribute("invitation.title").toString() %> + + + <%= view.getRequestAttribute("invitation.subtitle").toString() %> +
">
diff --git a/web/format/comm/members.jsp b/web/format/comm/members.jsp index 6d701ea..6579afa 100644 --- a/web/format/comm/members.jsp +++ b/web/format/comm/members.jsp @@ -26,7 +26,7 @@ %> Members view for community - + Find members of community "":

diff --git a/web/format/comm/profile.jsp b/web/format/comm/profile.jsp index b9ceaf6..125a990 100644 --- a/web/format/comm/profile.jsp +++ b/web/format/comm/profile.jsp @@ -29,7 +29,9 @@ String tmp; %> Profile for community # - + + <%= comm.getName() %> +
<%= view.getRequestAttribute("community.logo").toString() %>
diff --git a/web/format/comm/set_member.jsp b/web/format/comm/set_member.jsp index 21fea94..4808b26 100644 --- a/web/format/comm/set_member.jsp +++ b/web/format/comm/set_member.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -27,7 +27,7 @@ %> Set membership view for community - + diff --git a/web/format/conf/activity_report.jsp b/web/format/conf/activity_report.jsp index a10dd96..09f56f1 100644 --- a/web/format/conf/activity_report.jsp +++ b/web/format/conf/activity_report.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -29,8 +29,12 @@ Boolean.valueOf(view.getRequestAttribute("conference.activity.posters").toString()).booleanValue(); %> - <%= view.getRequestAttribute("conference.activity.title").toString() %> - <%= view.getRequestAttribute("conference.activity.subtitle").toString() %> + + <%= view.getRequestAttribute("conference.activity.title").toString() %> + + + <%= view.getRequestAttribute("conference.activity.subtitle").toString() %> + diff --git a/web/format/conf/aliases.jsp b/web/format/conf/aliases.jsp index f524ee5..828a819 100644 --- a/web/format/conf/aliases.jsp +++ b/web/format/conf/aliases.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -29,14 +29,14 @@ %> Managing aliases for conference "" - + conf/manage_conf.js.vs?cc=&conf= Return to Manage Conference Menu - +

<% Object errmsg = view.getRequestAttribute("conference.aliases.error_message"); %> <% if (errmsg!=null) { %> diff --git a/web/format/conf/conferences.jsp b/web/format/conf/conferences.jsp index 35bd0d8..43f0ee4 100644 --- a/web/format/conf/conferences.jsp +++ b/web/format/conf/conferences.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -28,7 +28,7 @@ %> Conference list for community "" - + <% if (confs.size()>0) { %> diff --git a/web/format/conf/custom.jsp b/web/format/conf/custom.jsp index 55eb361..47874a5 100644 --- a/web/format/conf/custom.jsp +++ b/web/format/conf/custom.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -27,7 +27,7 @@ %> Custom blocks for conference "" - +
diff --git a/web/format/conf/email.jsp b/web/format/conf/email.jsp index 3825ac9..6242781 100644 --- a/web/format/conf/email.jsp +++ b/web/format/conf/email.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -27,7 +27,7 @@ %> E-mail to conference "" - +
diff --git a/web/format/conf/find.jsp b/web/format/conf/find.jsp index a0cfad6..12b944d 100644 --- a/web/format/conf/find.jsp +++ b/web/format/conf/find.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -29,9 +29,13 @@ <% if (view.getTopic()!=null) { %> in Topic: <%= view.getTopic().getName() %> <% } else if (view.getConference()!=null) { %> - in Conference: <%= view.getConference().getName() %> + + in Conference: <%= view.getConference().getName() %> + <% } else { %> - in Community: <%= view.getCommunity().getName() %> + + in Community: <%= view.getCommunity().getName() %> + <% } // end if %> diff --git a/web/format/conf/manage_conf.jsp b/web/format/conf/manage_conf.jsp index 38451e2..709ccbe 100644 --- a/web/format/conf/manage_conf.jsp +++ b/web/format/conf/manage_conf.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -28,7 +28,7 @@ %> Managing conference "" - + diff --git a/web/format/conf/manage_list.jsp b/web/format/conf/manage_list.jsp index 46302dd..e224aa7 100644 --- a/web/format/conf/manage_list.jsp +++ b/web/format/conf/manage_list.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -30,7 +30,7 @@ %> Manage conference list for community "" - Community: + Community: diff --git a/web/format/conf/membership.jsp b/web/format/conf/membership.jsp index d23b4dc..4043b55 100644 --- a/web/format/conf/membership.jsp +++ b/web/format/conf/membership.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -28,7 +28,7 @@ %> Set membership view for conference - + diff --git a/web/format/conf/new_topic.jsp b/web/format/conf/new_topic.jsp index bab222e..fb61026 100644 --- a/web/format/conf/new_topic.jsp +++ b/web/format/conf/new_topic.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -35,7 +35,7 @@ <% } else { %> Preview New Topic <% } // end if %> - in: + in: <% if (preview_text!=null) { %> diff --git a/web/format/conf/report_menu.jsp b/web/format/conf/report_menu.jsp index ef15a7b..24837b2 100644 --- a/web/format/conf/report_menu.jsp +++ b/web/format/conf/report_menu.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -27,7 +27,7 @@ %> Reports for conference "" - + diff --git a/web/format/conf/topics.jsp b/web/format/conf/topics.jsp index b00bb44..25e4363 100644 --- a/web/format/conf/topics.jsp +++ b/web/format/conf/topics.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -47,7 +47,7 @@ + currc.getConference().getConfID(); %> Topic list for conference "" -Topics in +Topics in <%= view.getRequestAttribute("conference.custom.top").toString() %> diff --git a/web/format/photo_upload.jsp b/web/format/photo_upload.jsp index 45303a0..99fb872 100644 --- a/web/format/photo_upload.jsp +++ b/web/format/photo_upload.jsp @@ -11,7 +11,7 @@ The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -19,7 +19,9 @@ <%@ taglib uri="/tlds/util" prefix="util" %> <% PhotoUploader view = PhotoUploader.get(request); %> Photo uploading page - + + <%= view.getPageTitle() %> + <%= view.getHiddenParams() %>