To reproduce the bug,

Create a view
In the Header/Footer section, add a Global Unfiltered Text area
Place markup to create a Button (aka tag) in the area.
See Preview or save and find view elsewhere

It's expected that the verbiage is either corrected or that this area handler is corrected to allow unfiltered markup.

Comments

generalredneck created an issue. See original summary.

eightygrit’s picture

Ditto.

markdc’s picture

Double ditto.

jcmartinez’s picture

This still happens with Drupal 8.8.5 and tokens.

To reproduce:

1 - Create a user based view.

2 - Add field User: User ID [hidden]

3 - Add to Header or Footer: Global: Unfiltered text

4 - Within content add:

<a href="/user/{{ uid }}/edit?destination=/dashboard">Edit account</a>

This part of the view will render as:

<a>


1


/edit?destination=/dashboard"&gt;Edit account</a>

The expectation is that it would render as:

<a href="/user/1/edit?destination=/dashboard">Edit account</a>

Things that I have tried:

I tested without a token. This works, but it's not what I need:

<a href="/user/1/edit?destination=/dashboard">Edit account</a>

Workaround:

I ended up building the link by rewriting a field in the field area of the view which does the token replacements and doesn't remove HTML.

gnanagowthaman sankar’s picture

Assigned: Unassigned » gnanagowthaman sankar
Issue tags: +DIACWApril2020
jcmartinez’s picture

Version: 8.0.2 » 8.8.5
gnanagowthaman sankar’s picture

Version: 8.8.5 » 8.0.2
Status: Active » Needs review
StatusFileSize
new41.38 KB
new31.81 KB
new46.73 KB
new43.64 KB

Hi @jcmartinez,

I cannot able to replicate the issue on my localsite. Can you please guide if am wrong. I am attaching the working screenshots.

Thanks & Regards,
Gnanagowthaman Sankar

gnanagowthaman sankar’s picture

Version: 8.0.2 » 8.8.5
Status: Needs review » Active
gnanagowthaman sankar’s picture

Status: Active » Needs review

Sorry for the adding more comments i had change the version no

himanshu_sindhwani’s picture

Status: Needs review » Closed (duplicate)

The unfiltered text is filtered using Xss::filterAdmin(), therefore only certain tags are allowed like in the custom text field. I have updated the description of the filtered text and added a help text which makes it more clear while using HTML in content. Closing this issue as a duplicate. Follow the trail here Wrapper gets removed while adding html textfield or textarea using replacement patterns

jcmartinez’s picture

This issue was created in 2016.
You shouldn't set the exact same issue created a few months ago as the parent. Lot's of people have provided feedback on this issue and their contribution shouldn't be ignored.
I'm setting this as a related issue, even though https://www.drupal.org/project/drupal/issues/3136107 is actually the duplicate, because the duplicate has a patch.

himanshu_sindhwani’s picture

Yes, you are right the contributions shouldn't be ignored.
A couple of things I noticed before marking this as closed and a child issue:

  1. The issue talkes about the only Unfiltered text while the latter one covers Unfiltered text and Textarea use cases.
  2. The issue didn't had any patch/solution.

Therefore I uploaded the patch to the newer issues and asked for the feedbacks.