diff --git a/includes/context.inc b/includes/context.inc index 720a6fc..4e76f06 100644 --- a/includes/context.inc +++ b/includes/context.inc @@ -508,6 +508,17 @@ function ctools_context_get_all_converters() { /** * Let the context convert an argument based upon the converter that was given. + * + * @param $context + * The context object + * @param $converter + * The converter to use, which should be a string provided by the converter list. + * @param $converter_options + * A n array of options to pass on to the generation function. For contexts + * that use token module, of particular use is 'sanitize' => FALSE which can + * get raw tokens. This should ONLY be used in values that will later be + * treated as unsafe user input since these values are by themselves unsafe. + * It is particularly useful to get raw values from Field API. */ function ctools_context_convert_context($context, $converter, $converter_options = array()) { // Contexts without plugins might be optional placeholders. diff --git a/views_content/plugins/content_types/views.inc b/views_content/plugins/content_types/views.inc index 04b6869..948c1d0 100644 --- a/views_content/plugins/content_types/views.inc +++ b/views_content/plugins/content_types/views.inc @@ -144,7 +144,7 @@ function views_content_views_content_type_render($subtype, $conf, $panel_args, $ list($cid, $converter) = explode('.', $context_info, 2); } if (!empty($contexts[$cid])) { - $arg = ctools_context_convert_context($contexts[$cid], $converter); + $arg = ctools_context_convert_context($contexts[$cid], $converter, array('sanitize' => FALSE); array_splice($args, $count, 0, array($arg)); } } diff --git a/views_content/plugins/relationships/view_from_argument.inc b/views_content/plugins/relationships/view_from_argument.inc index 4da5fe5..4946523 100644 --- a/views_content/plugins/relationships/view_from_argument.inc +++ b/views_content/plugins/relationships/view_from_argument.inc @@ -77,7 +77,7 @@ function views_content_view_from_argument_context($contexts, $conf) { if (isset($contexts [$key])) { if (strpos($argument['context'], '.')) { list($context, $converter) = explode('.', $argument['context'], 2); - $args[] = ctools_context_convert_context($contexts[$key], $converter); + $args[] = ctools_context_convert_context($contexts[$key], $converter, array('sanitize' => FALSE)); } else { $args[] = $contexts[$key]->argument;