I'm using a plain text field with a default value of: [current-page:query:key_name]

This works fine until trying to use an apostrophe. The URL looks like: http://example.com/test?key_name=Ryan%27s%20Store

And the field is being filled with: Ryan's Store instead of: Ryan's Store.

I haven't tried with other special characters yet, but it appears the module isn't decoding the URL properly.

CommentFileSizeAuthor
#2 html-decoding-2215031-1.patch1.11 KBapmsooner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apmsooner’s picture

Same issue here...

apmsooner’s picture

Here's a patch... is this the proper approach? Works for me...

apmsooner’s picture

Status: Active » Needs review
apmsooner’s picture

FYI, same logic for patch derived from here:

https://www.drupal.org/node/1776898

The proper token to use should also be noted. Example: [current-user:field-company-name] works with patch applied while [current-user:field_company_name] will still output html special characters.

ryantollefson’s picture

Thanks! Seems to work fine for what I need.

apmsooner’s picture

Status: Needs review » Reviewed & tested by the community

Lets mark this RBTC as its a simple fix and hope maintainer can show some love on getting into release.

maximpodorov’s picture

Assigned: Unassigned » maximpodorov

maximpodorov’s picture

Status: Reviewed & tested by the community » Fixed

@apmsooner, thank you for the patch.

Status: Fixed » Closed (fixed)

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

blueblot’s picture

Hi

I'm using this in D8 but the decoding doesn't work.

Kris

maximpodorov’s picture

The current issue is about D7.

blueblot’s picture

yes, I know, should I make a new issue for D8?

maximpodorov’s picture

Yes, please.