You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Stephen Winnall <st...@winnall.ch> on 2007/02/09 17:21:23 UTC
XML entities and Roller output
I am trying to integrate Roller 3.0 with Cocoon for my website. The
Roller output is passed to Cocoon, which expects pure XML. 99% of the
time, this is no problem. However, when I send Roller a request like
http://localhost:8888/blog/en/category/General
I get code back which contains an unescaped ampersand. The following
is a snippet from the top of the Roller calendar:
<table cellspacing="0" border="0" summary="Blog Archive Calendar"
class="hCalendarTable">
<tr>
<td colspan="7" align="center" class="hCalendarMonthYearRow">
<a href="/roller/en/?cat=General&date=200701" title="Prev"
class="hCalendarNavBar">«</a> February 2007
</td>
</tr>
Any XML processor is likely to complain about the href because it
sees "&date=" as a syntactically incorrect XML entity. What an XML
processsor needs in this situation is "&date=" or the URL-escaped
variant "%26date=".
After looking at the source, I think the problem is in
getQueryString in org.apache.roller.util.URLUtilities
getQueryString just outputs a plain "&", with no options for other
formats as far as I can see.
Is there any way of telling Roller to generate 100% pure XML (or at
least an & or the URL-encoding in this case)?
Steve