incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bohn (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JSPWIKI-633) changenote and replaceEntities
Date Fri, 29 Jan 2010 18:08:34 GMT

    [ https://issues.apache.org/jira/browse/JSPWIKI-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806417#action_12806417
] 

Stefan Bohn commented on JSPWIKI-633:
-------------------------------------

Harry,

the quoting with replaceEntity is ok, but it should only be done once...

When you edit a page, the changenote gets quoted.
And when the RecentChangePlugin reads the changenote from the file, it is again quoted.
So the generated html is double qouted and you see the html-entity instead of the expected
sign on the webpage.

 (using spaces between chars because of JIRA... I'm still struggling with JIRA markup ;) )


user input: >
saved file contains:  & g t ;
generated html from RecentChangePlugin: & a m p ; g t ;

with rename, the saved file contains: = = >
generated html from RecentChangePlugin: = = & g t ;

Both places, where the changenote is saved, should replace the entites. So the RecentChangePlugin
must not replace it again.

(hope, JIRA does not mix up my text again...)


> changenote and replaceEntities
> ------------------------------
>
>                 Key: JSPWIKI-633
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-633
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.8.3
>         Environment: Redhat Linux, Tomcat 6.0.16
>            Reporter: Stefan Bohn
>            Priority: Minor
>
> When editing a page, you can enter the changenote.
> Edit.jsp, Line 45:
> String changenote = TextUtil.replaceEntities( findParam( pageContext, "changenote" )
);
> RecentChangePlugin.java, Line 217
> row.addElement( new td(changenote != null ? TextUtil.replaceEntities(changenote) : "").setClass("changenote")
);
> So the entities of the text entered via Edit.jsp are replaced twice.
> PageRenamer.java Lines 139 and 206:
> p.setAttribute( WikiPage.CHANGENOTE, fromPage.getName()+" ==> "+toPage.getName() );
> TextUtil.replaceEntities is not called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message