summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-10-30 21:44:31 +0000
committerSarven Capadisli <csarven@status.net>2009-10-30 21:44:31 +0000
commitdcca9fbec0cea9c5e15c4d58a8e9870514dfdbdd (patch)
treec07b464a348f66bf1737296b030e895a2c5982b3
parentafe663af82250d020fd9dff0646c91c8f3b41013 (diff)
IE has some issue with notices that are sent with file attachments. It
doesn't like the XHR response with XHTML DTD. New notices without the file attachment work fine. The rendered content (the anchor for the file attachment link) doesn't appear to be the issue. To fix this problem, I removed the XHTML DTD line from newnotice's XHR response. This is unnecessary for text/xml outputs that's intended for XHR responses any way. It just happens to fix an IE issue. Still a mystery to me as to why it is particular to notices with file attachments.
-rw-r--r--actions/newnotice.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index 8c0476f70..548832eca 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -271,7 +271,9 @@ class NewnoticeAction extends Action
common_broadcast_notice($notice);
if ($this->boolean('ajax')) {
- $this->startHTML('text/xml;charset=utf-8');
+ header('Content-Type: text/xml;charset=utf-8');
+ $this->xw->startDocument('1.0', 'UTF-8');
+ $this->elementStart('html');
$this->elementStart('head');
$this->element('title', null, _('Notice posted'));
$this->elementEnd('head');