Commit or not?
Index: src/main/java/org/apache/wicket/Page.java
===================================================================
--- src/main/java/org/apache/wicket/Page.java (revision 658674)
+++ src/main/java/org/apache/wicket/Page.java (working copy)
@@ -1372,9 +1372,13 @@
if ((markupStream != null) && (markupStream.getXmlDeclaration()
!= null) &&
(application.getMarkupSettings().getStripXmlDeclarationFromOutput()
== false))
{
- response.write("<?xml version='1.0' encoding='");
+ // Gwyn - Wed, 21 May 2008 12:23:41
+ // If the xml declaration in the markup used
double-quotes, use
them in the output too
+ // Whether it should be or not, sometimes it's
significant...
+ char quoteChar =
(markupStream.getXmlDeclaration().indexOf('\"')
== -1) ? '\'' : '\"';
+ response.write("<?xml version=" + quoteChar + "1.0" +
quoteChar +
" encoding=" + quoteChar);
response.write(encoding);
- response.write("'?>");
+ response.write(quoteChar + "?>");
}
// Set response locale from session locale
---------- Forwarded message ----------
From: Gwyn Evans <[EMAIL PROTECTED]>
Date: Wed, May 21, 2008 at 12:23 AM
Subject: Re: Quote replacement in document prologue?
To: [EMAIL PROTECTED]
Ah - org.apache.wicket.Page#configureResponse doesn't take account of
the specified template, just uses it's hard-coded one... Tomorrow...
/Gwyn
On Wed, May 21, 2008 at 12:10 AM, Gwyn Evans <[EMAIL PROTECTED]> wrote:
> Just noticed that even though I specify a prologue as:
> <?xml version="1.0" encoding="UTF-8"?>
> it gets delivered as:
> <?xml version='1.0' encoding='UTF-8'?>
>
> Anyone able to point me to where this is happening, as the particular
> document spec variant I'm trying to work to here requires the
> former...
>
> /Gwyn
>