The result of this could be nasty, in most cases the drupal_set_title() is called with the $view->get_title() and gets double encoded.

CommentFileSizeAuthor
#6 without_patch.png11.93 KBdawehner
#6 with_path.png13.32 KBdawehner
#1 views_1070590.patch888 bytesr.villetet

Comments

r.villetet’s picture

StatusFileSize
new888 bytes
merlinofchaos’s picture

Status: Active » Needs review

Hmm. I think we might need to call drupal_set_title() with the field that prevents check_plain().

Unless I"m misremembering, all the validators will check their titles, not just this one.

dawehner’s picture

    drupal_set_title(filter_xss_admin($this->view->get_title()), PASS_THROUGH);

This shouldn't run check_plain again.

dawehner’s picture

So does someone understand why it does not work at the moment?

Chaning this things without real knowledge of the issue might cause security issues.

merlinofchaos’s picture

I think because in Drupal 6, drupal_set_title() didn't run check_plain() so Views was coded to make sure the title was always safe.

In D7, that causes double encoding.

dawehner’s picture

StatusFileSize
new13.32 KB
new11.93 KB

Check_plain isn't runned anymore, just filter_xss_admin, see the two screenshots.

john_t’s picture

I've been all over forum trying to find solution for following errors:

Declaration of views_plugin_argument_validate_taxonomy_term::init() should be compatible with that of
views_plugin_argument_validate::init() in require_once()

Declaration of views_plugin_argument_validate_taxonomy_term::options_submit() should be compatible with that of
views_plugin_argument_validate::options_submit() in require_once

I have updated to latest version of developer edition, plus ran the following patches to try and fix them including this one:

1015960-12-exposed_filters_ajax_0.patch
1022484-uc_product-views-image.patch
views-1025518.patch

And when trying to run 'this patch' (views_1070590.patch) I get the following error:
'views_plugin_argument_validate_taxonomy_term.inc' doesn't exist. (which is true because I can't find it when I searched for it in folder: C:\xampp\htdocs\drupal\sites\all\modules\views\plugins either.)

I'm new at Drupal, so I might be making some really simple mistakes that could case errors etc., so any further suggestions for me to try and remove these bugs would be appreciated.

merlinofchaos’s picture

(which is true because I can't find it when I searched for it in folder: C:\xampp\htdocs\drupal\sites\all\modules\views\plugins either.)

That's because it's in modules/taxonomy because it's a module specific plugin.

merlinofchaos’s picture

Status: Needs review » Closed (cannot reproduce)

Testing the current code, I see no evidence of double encoding on taxonomy term titles when using the validator.