Hi,
I've a question about snippet parameter processing for other content types than 'text/html'. I created an Markdown Extra where I'm using the the content type 'text/x-markdown' and it seems like that the
property processing is based on the content type.
For example: I'm using the Extra LudwigShariff in an article:
[[shariff? &srv=`whatsapp,facebook` &addjs=`0` &addcss=`0`]]
If I'm running it with the content type 'text/html',
$addcss= $modx->getOption('addcss', $scriptProperties, 1); // Add CSS to Modx
gives me '
0' back.
But if I change the content type to 'text/x-markdown', $addcss gives me back '
<code>0</code>'. The shariff snippet gives me the following
var_dump( $scriptProperties ); output:
array (size=3)
'srv' => string '<code>whatsapp,facebook</code>' (length=30)
'addjs' => string '<code>0</code>' (length=14)
'addcss' => string '<code>0</code>' (length=14)
At the moment I'm using
foreach ( $scriptProperties as $key => $val)
{
$scriptProperties[$key]= str_replace( array("<code>","</code>"), array("",""), $val );
}
but this is only a temporary solution.
Has anyone an idea, what I'm missing in the markdown extra to process the parameter as it is done in text/html?
Cheers,
Thomas
[ed. note: MoonMaker last edited this post 9 years, 4 months ago.]