Search code examples
parsinghtml-parsingcode-snippetsmodxmodx-evolution

MODX: Snippet strips and hangs string when parsing the vars


i have a snippet call like this:

[!mysnippet?&content=`[*content*]` !]

What happen is that, if i send some html like this:

[!mysnippet?&content=`<p color='red'>Yeah</p>` !]

it will return this:

<p colo

the [test only] snippet code (mysnippet) is:

<?php
return $content;
?>

Why is this happening? My actual snippet is converting html to pdf, so i really need this.

Thank you all ;D

EDIT: I'm using Modx Evo 1.0.2


Solution

  • MODx Evolution has a limitation whereby you can't use "=" (equals signs) in Snippet parameter values. Best solution is to place the content in a chunk or TV and then call it. This is not an issue in MODx Revolution.