This is to document a "fix" to a quoting problem I discovered on my board.
The issue was trying to quote an emailed reply to a posted message - and the posted reply contained an "&" character that was not escaped (should be "&") and goofed up the xml...
The quote function would stall forever with a "LOADING" banner..
Spuds chased it down.. and the fix
WAS to locate the
Xml.template.php file in the theme folder and locate
function template_quotefast()
{
global $context;
echo '<', '?xml version="1.0" encoding="UTF-8"?', '>
<elk>
<quote>', cleanXml($context['quote']['xml']), '</quote>
</elk>';
}
..and replace the "quote" line with:
<quote><![CDATA[', cleanXml($context['quote']['xml']), ']]></quote>
That should take care of any "non-escaped" characters that are posted to your forum from emails that cause subsequent quoting of that post to fail
I suspect Spuds will fold this into later releases..
EDIT:
He did, and created some different issues.. so see the next message post in this thread
Better Fix -
If you made the above change to the Xml.template.php file in templates, revert it.
Then. locate post.controller.php in sources and find (around line 1199):
$context['quote']['xml'] = strtr($context['quote']['xml'], array(' ' => ' ', '<' => '<', '>' => '>'));
$context['quote']['xml'] = strtr(Util::htmlspecialchars($context['quote']['xml']), array(' ' => ' '));
The problem was that the first fix didn't allow for unescaping escaped characters.., which created some new issues reported here (https://www.elkarte.net/community/index.php?topic=6141.msg44199#msg44199).