Skip to main content
Quote Fail -v1.1.6 Started by Steeley · · Read 10930 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Quote Fail -v1.1.6

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
Code: [Select]

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:

Code: [Select]

        <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
Last Edit: November 13, 2022, 06:18:54 pm by Steeley

// Deep inside every dilemma lies a solution that involves explosives //

Re: Quote Fail -v1.1.6

Reply #1

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):
Code: (find) [Select]
			$context['quote']['xml'] = strtr($context['quote']['xml'], array('&nbsp;' => ' ', '<' => '&lt;', '>' => '&gt;'));
Code: (replace) [Select]
			$context['quote']['xml'] = strtr(Util::htmlspecialchars($context['quote']['xml']), array('&nbsp;' => ' '));

The problem was that the first fix didn't allow for unescaping escaped characters.., which created some new issues reported here.

// Deep inside every dilemma lies a solution that involves explosives //