shuber 2004/09/30 14:50:55 CEST
Modified files: (Branch: JAHIA-4-0-BRANCH)
src/java/org/jahia/services/pages ContentPage.java
src/views/jsp/jahia/engines/workflow workflow_mailnotif.jsp
Log:
Remove HTML encoding from page title in Workflow email notifications.
Revision Changes Path
1.72.2.9 +16 -2 jahia/src/java/org/jahia/services/pages/ContentPage.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/services/pages/ContentPage.java.diff?r1=1.72.2.8&r2=1.72.2.9&f=h
1.3.4.1 +4 -4
jahia/src/views/jsp/jahia/engines/workflow/workflow_mailnotif.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/views/jsp/jahia/engines/workflow/workflow_mailnotif.jsp.diff?r1=1.3&r2=1.3.4.1&f=h
Index: ContentPage.java
===================================================================
RCS file:
/home/cvs/repository/jahia/src/java/org/jahia/services/pages/Attic/ContentPage.java,v
retrieving revision 1.72.2.8
retrieving revision 1.72.2.9
diff -u -r1.72.2.8 -r1.72.2.9
--- ContentPage.java 30 Sep 2004 11:27:29 -0000 1.72.2.8
+++ ContentPage.java 30 Sep 2004 12:50:54 -0000 1.72.2.9
@@ -854,12 +854,26 @@
* @return Return the page title.
*/
public final String getTitle (EntryLoadRequest loadRequest) {
+ return getTitle(loadRequest, true);
+ }
+
+ /**
+ * Returns the page title for the specified EntryLoadRequest, eventually
+ * encoding it for HTML output.
+ * @param loadRequest EntryLoadRequest
+ * @param htmlCompliant boolean
+ * @return String
+ */
+ public final String getTitle(EntryLoadRequest loadRequest, boolean
htmlCompliant) {
JahiaPageInfo pageInfo = getPageInfoVersion (loadRequest, false, false);
if (pageInfo == null) {
return null;
}
-
- return JahiaTools.text2html (pageInfo.getTitle ());
+ if (htmlCompliant) {
+ return JahiaTools.text2html(pageInfo.getTitle());
+ } else {
+ return pageInfo.getTitle();
+ }
}
/**
Index: workflow_mailnotif.jsp
===================================================================
RCS file:
/home/cvs/repository/jahia/src/views/jsp/jahia/engines/workflow/Attic/workflow_mailnotif.jsp,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -r1.3 -r1.3.4.1
--- workflow_mailnotif.jsp 10 Nov 2003 10:44:20 -0000 1.3
+++ workflow_mailnotif.jsp 30 Sep 2004 12:50:54 -0000 1.3.4.1
@@ -52,11 +52,11 @@
}
if (!pageDeleted) {
%>
-- Page "<%= curPageNotifData.getContentPage().getTitle(paramBean)%>" (ID=<%=
curPageNotifData.getContentPage().getID()%>)
+- Page "<%=
curPageNotifData.getContentPage().getTitle(paramBean.getEntryLoadRequest(), false)%>"
(ID=<%= curPageNotifData.getContentPage().getID()%>)
Link on Jahia site : <%= curPageNotifData.getPageURL() %>
Comment : <%=curPageNotifData.getPageComment() %><%
}
-
pageTitleList.append(curPageNotifData.getContentPage().getTitle(paramBean));
+
pageTitleList.append(curPageNotifData.getContentPage().getTitle(paramBean.getEntryLoadRequest(),
false));
pageTitleList.append(", ");
}
}
@@ -72,7 +72,7 @@
while (pageIter.hasNext()) {
WorkflowEngine.PageNotifData curPageNotifData =
(WorkflowEngine.PageNotifData) pageIter.next();
%>
-- Page "<%= curPageNotifData.getContentPage().getTitle(paramBean)%>" (ID=<%=
curPageNotifData.getContentPage().getID()%>)
+- Page "<%=
curPageNotifData.getContentPage().getTitle(paramBean.getEntryLoadRequest(), false)%>"
(ID=<%= curPageNotifData.getContentPage().getID()%>)
Comment : <%=curPageNotifData.getPageComment() %><%
}
}
@@ -83,4 +83,4 @@
}
paramBean.getRequest().setAttribute("org.jahia.engines.workflow.notify.subject",
"[JAHIA] Workflow modification by user " + paramBean.getUser().getUsername() + " on
page(s) : " + pageTitleListFinal);
-%>
\ No newline at end of file
+%>