2013-04-30, 01:07:51
(2012-05-16, 06:28:13)mvlcek Wrote: The content filter is available to filter the content of pages and replace parts or do some other processing.
If a plugin wants to replace the page content completely, it should rather do this in index-pretemplate:
...
I've found that if you use index-pretemplate instead of the content filter to replace a page's content, the $content variable must be prepared (encoded, slashed) so that GS can process it properly -- if not, a page having < in the body will be broken or not rendered as expected, as it is decoded to <
Would this be the correct way to fix this?
Code:
$content = addslashes(htmlspecialchars($content, ENT_NOQUOTES, 'UTF-8'));
BTW @shawn_a - GS Blog seems to have this problem.