jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r627895 - /incubator/jspwiki/trunk/src/webdocs/Comment.jsp
Date Thu, 14 Feb 2008 22:22:24 GMT
Author: jalkanen
Date: Thu Feb 14 14:22:22 2008
New Revision: 627895

URL: http://svn.apache.org/viewvc?rev=627895&view=rev
Log:
JSPWIKI-171: No longer shows null preview with FCK.

Modified:
    incubator/jspwiki/trunk/src/webdocs/Comment.jsp

Modified: incubator/jspwiki/trunk/src/webdocs/Comment.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/Comment.jsp?rev=627895&r1=627894&r2=627895&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/Comment.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/Comment.jsp Thu Feb 14 14:22:22 2008
@@ -223,7 +223,19 @@
     else if( preview != null )
     {
         log.debug("Previewing "+pagereq);
-        session.setAttribute(EditorManager.REQ_EDITEDTEXT, EditorManager.getEditedText(pageContext));
+        
+        String commentText = EditorManager.getEditedText(pageContext);
+        
+        //
+        //  WYSIWYG editor sends us its greetings
+        //
+        String htmlText = findParam( pageContext, "htmlPageText" );
+        if( htmlText != null && cancel == null )
+        {
+        	commentText = new HtmlStringToWikiTranslator().translate(htmlText,wikiContext);
+        }
+        
+        session.setAttribute(EditorManager.REQ_EDITEDTEXT, commentText);
         response.sendRedirect( TextUtil.replaceString( wiki.getURL(WikiContext.PREVIEW, pagereq,
"action=comment", false),"&","&") );
         return;
     }



Mime
View raw message