Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | html-decoding-2215031-1.patch | 1.11 KB | apmsooner |
Comments
Comment #1
apmsooner CreditAttribution: apmsooner commentedSame issue here...
Comment #2
apmsooner CreditAttribution: apmsooner commentedHere's a patch... is this the proper approach? Works for me...
Comment #3
apmsooner CreditAttribution: apmsooner commentedComment #4
apmsooner CreditAttribution: apmsooner commentedFYI, 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.
Comment #5
ryantollefson CreditAttribution: ryantollefson commentedThanks! Seems to work fine for what I need.
Comment #6
apmsooner CreditAttribution: apmsooner commentedLets mark this RBTC as its a simple fix and hope maintainer can show some love on getting into release.
Comment #7
maximpodorov CreditAttribution: maximpodorov commentedComment #9
maximpodorov CreditAttribution: maximpodorov commented@apmsooner, thank you for the patch.
Comment #11
blueblot CreditAttribution: blueblot commentedHi
I'm using this in D8 but the decoding doesn't work.
Kris
Comment #12
maximpodorov CreditAttribution: maximpodorov commentedThe current issue is about D7.
Comment #13
blueblot CreditAttribution: blueblot commentedyes, I know, should I make a new issue for D8?
Comment #14
maximpodorov CreditAttribution: maximpodorov commentedYes, please.