shuber      2004/09/30 14:54:09 CEST

  Modified files:
    core/src/java/org/jahia/services/pages ContentPage.java 
    core/src/webapp/jsp/jahia/engines/workflow 
                                               workflow_mailnotif.jsp 
  Log:
  Remove HTML encoding from page title in Workflow email notifications.
  
  Revision  Changes    Path
  1.7       +16 -2     jahia/core/src/java/org/jahia/services/pages/ContentPage.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/services/pages/ContentPage.java.diff?r1=1.6&r2=1.7&f=h
  1.2       +3 -3      
jahia/core/src/webapp/jsp/jahia/engines/workflow/workflow_mailnotif.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/engines/workflow/workflow_mailnotif.jsp.diff?r1=1.1&r2=1.2&f=h
  
  
  
  Index: ContentPage.java
  ===================================================================
  RCS file: /cvs/jahia/core/src/java/org/jahia/services/pages/ContentPage.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ContentPage.java  8 Sep 2004 11:46:43 -0000       1.6
  +++ ContentPage.java  30 Sep 2004 12:54:08 -0000      1.7
  @@ -860,12 +860,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: 
/cvs/jahia/core/src/webapp/jsp/jahia/engines/workflow/workflow_mailnotif.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- workflow_mailnotif.jsp    30 Mar 2004 14:16:26 -0000      1.1
  +++ workflow_mailnotif.jsp    30 Sep 2004 12:54:09 -0000      1.2
  @@ -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() %><%
           }
       }
  

Reply via email to