Since #853880: Views: Rewrite field, strips some HTML tags (SOLUTION/WORKAROUND FOUND FOR STYLE TAG) is locked I'm opening a new issue.

Problem: If I have a views_data_export XML display then it does not make sense to strip tags from the "rewrite results" content, because I want those tags in the XML output.

Solution: don't run filter_xss_admin() on the rewrite text because views editors are already trusted users with the "administer views" permission.

Although the Views maintainers don't seem to want to accept this I want to have my drush make patches in a public issue on drupal.org

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi’s picture

Status: Active » Needs review
FileSize
772 bytes

Patch.

klausi’s picture

FileSize
781 bytes

Rerolled for latest Views release.

vipul tulse’s picture

Assigned: Unassigned » vipul tulse
MustangGB’s picture

Assigned: vipul tulse » Unassigned

vipul tulse, why are you assigning so many issues to yourself?

If you're not actively working on a patch then there is no need, and this patch is already complete so there is nothing more to do.

You don't need to assign yourself if you only wish to review.

jvieille’s picture

Thank you so much for giving the solution for this frustrating issue that was denied for ages by the Drupal Gurus.
This was really non-sense.

DamienMcKenna’s picture

@jvieille: that attitude is not necessary - the overwhelming majority of people maintaining and contributing to Drupal do so on a volunteer basis, you don't need to get condescending that a bug hasn't been fixed fast enough for you.

This patch needs some reviews, can someone please provide that? Thank you.

danieldd’s picture

Thank you for making this change.

I've deployed the patch and can confirm it works as intended - in my case being able to add style tags to views fields, to enable display of background images.

I hope this can be rolled into an official release soon.

DamienMcKenna’s picture

This is a small improvement, presuming the test coverage is still ok, I'm going to add it to 3.23.

  • DamienMcKenna committed 535ff98 on 7.x-3.x authored by klausi
    Issue #2529948 by klausi, danieldd: Remove filter_xss_admin() from...
DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

BartNijs’s picture

This doesn't work for translated views. In a translated custom text field, the style attribute still gets stripped out.
Any workaround for this?

DamienMcKenna’s picture

@Bartelli: Please open a new issue for that and we can work on it. Thanks.