Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
VanillaForums and MIME-Type application/xhtml+xml
cdavid
New
Dear all,
I was wondering if I can enable the serving of VanillaForums pages with this respective mime-type (application/xhtml+xml). I need it in order to serve MathML content on the webpages.
I looked at applications/dashboard/views/default.master.php and found that if i replace the header there with something like
But, whenever I try to reload any page, I get an error:
because the & is not escaped.
First of all, am i doing the right thing?
Second of all, any idea how I can fix this error?
Thanks a lot,
Catalin
P.S.: Running Vanilla 2.0.1
I was wondering if I can enable the serving of VanillaForums pages with this respective mime-type (application/xhtml+xml). I need it in order to serve MathML content on the webpages.
I looked at applications/dashboard/views/default.master.php and found that if i replace the header there with something like
<?php
$mime="application/xhtml+xml";
$charset="utf-8";
header("Content-Type: $mime;charset=$charset");
echo '<?xml version="1.0" encoding="utf-8"?>';
?>
But, whenever I try to reload any page, I get an error:
XML Parsing Error: not well-formed
Location: http://localhost/v/index.php?p=/discussion/3/sdgasdfa/#Item_5
Line Number 32, Column 93:
<li class="NonTab SignOut"><a href="/v/index.php?p=/entry/leave/password/CI5BYN2IAFYG&Target=discussions">Sign Out</a></li>
because the & is not escaped.
First of all, am i doing the right thing?
Second of all, any idea how I can fix this error?
Thanks a lot,
Catalin
P.S.: Running Vanilla 2.0.1
0
Comments
Specifically, the line:
$Query = str_replace('?', '&;', $Query);
should be:
$Query = str_replace('?', '&', $Query);
in order to fit the XHTML standard (in which & should be escaped as & ).
/cd
One thing you might do is content negotiation with the client in the headers. IE will say that it's IE (in the headers -- UserAgent) and it will say Accept: text/html . In this case, you can redirect them to a static page in which you say they need to have FF or any other real browser.
/cd
/cd