| Title | Suspected minor bugs involving ampersand |
| Date | 29-Aug-2005 14:58:30 EEST |
| Version | 2.2.28 |
| Submitter | GregorHagedorn |
| Bug criticality | LightBug |
| Browser version | |
| Bug status | ClosedBug |
| PageProvider used | JDBC |
| Servlet Container | Tomcat 55 |
| Operating System | |
| URL | |
| Java version |
I encountered the follwing in PageModified.jsp:
usertext = TextUtil.replaceString( usertext, "<", "<" );\\
usertext = TextUtil.replaceString( usertext, ">", ">" );\\
usertext = TextUtil.replaceString( usertext, "\n", "<BR />" );\\
The purpose seems to be to make something ready to be displayed in html. However, in xthml at least the ampersand would have to be escaped as well.
On the other side, the status of character entities (such as Auml; or nbsp;) in JSP Wiki pages seems to be undefined. Logically they
should be onyl supported if html is turned on, and if html is enabled, all & should be illegal and char. entities untranslated.
Also note: <BR /> needs to be <br /> for xhtml.
Related: In TranslateReader.java I found commented out:\\ /* case '&': s = "&"; break; */\\ which I believe should be:\\ case '&': s = m_allowHTML ? "&" : "&"; break;\\
Gregor
Should be mostly fixed in 2.3.31.