Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
TXP adding random ampersands in custom fields.
Very bizarre.
I’m using 4.4.1 and a custom field to hold a location for Google maps. An example of the custom field value:
http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=Chaucer+Barn,+Holt+Road,+Gresham&aq=0&oq=Chaucer+barn&sll=52.634369,1.362532&sspn=0.011929,0.026221&ie=UTF8&hq=Chaucer+Barn,+Holt+Road,+Gresham&hnear=&radius=15000&t=m&ll=52.913664,1.208496&spn=0.113866,0.284615&z=12&iwloc=A&output=embed
When I pull that into the page, all of these in the above code:
&
Turn into this:
&
Which obviously breaks Google maps integration.
Help would be very much appreciated, I can’t launch a new section until I get this working.
Thanks,
Ross
Last edited by rossharvey (2012-01-30 19:48:38)
Offline
#2 2012-01-30 19:53:42
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: TXP adding random ampersands in custom fields.
Try escape=""
in the custom_field tag.
Offline
Re: TXP adding random ampersands in custom fields.
Els wrote:
Try
escape=""
in the custom_field tag.
I love you els. Thanks.
Brought up another error – it’s being truncated. Any way to lengthen the custom field character limit?
Offline
#4 2012-01-30 20:04:23
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: TXP adding random ampersands in custom fields.
Yes, but you need to change the field type in the database (using phpMyAdmin). For custom fields it’s VARCHAR, you can change it to TEXT for instance.
Offline
Re: TXP adding random ampersands in custom fields.
Els wrote:
Yes, but you need to change the field type in the database (using phpMyAdmin). For custom fields it’s VARCHAR, you can change it to TEXT for instance.
Awesome – thank you very (very!) much :¬)
Last edited by rossharvey (2012-01-30 20:13:01)
Offline