When the dependent field has an & in one of its terms, it doesn't escape the ampersand and instead displays its HTML entity.

I have a field (a taxonomy) that is dependent on another field (another taxonomy). When the dependent taxonomy field spawns, instead of it being "DFS & DCFD", it displays as "DFS & amp; DCFD".

I've tried to escape and replace the name in the Taxonomy Dependencies view, but nothing worked. Ex I tried: {{ name|replace({"amp;": ""}) }}

I apologize if this is a duplicate.

Comments

niles38 created an issue. See original summary.

niles38’s picture

Issue summary: View changes
colan’s picture

Version: 8.x-1.0-beta7 » 8.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.44 KB

Does this work for you and make sense as a solution?

niles38’s picture

Hey. I'm so sorry, I didn't see this patch until now.

Yes, this works on my end! Thank you so much!

  • colan committed eb2fa59 on 8.x-1.x
    Issue #3048917 by colan: Decode HTML entities before making them select...
colan’s picture

Status: Needs review » Fixed

Thanks for the feedback.

Status: Fixed » Closed (fixed)

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