Quote from: smooth-graphics at Jan 23, 2011, 06:08 AM
I’ve already written above that it just doesn’t work. Tags are not stripped.
my bad, didn’t notice, sorry.
I’ve checked it and for me it works as it should (on 2.0.7-PL).
nothing changed on the
core/model/modx/filters/modoutputfilter.class.php
considering the limit-filter you are using for placing this data to the meta description tag,
i think instead of cutting the words at the 175th char, it’s better keep them whole using this filter/snippet (WholeWords):
<?php
$output = '';
$input = strip_tags($input);
if (!empty($input) && !empty($options)) {
if (strlen($input) > $options) {
$output = substr($input, 0, strrpos(substr($input, 0, $options), ' '));
} else $output = $input;
}
return $output;
then you can use it as a filter:
[[*content:WholeWords=`175`]]
or better (=faster) as a snippet:
[[WholeWords? $input=`[[*content]]` $options=`175`]]