CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Inserting ampersands via REST API
Pages: [1]

Author Topic: Inserting ampersands via REST API  (Read 337 times)

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Inserting ampersands via REST API
July 27, 2014, 06:40:44 pm
I just tried inserting a value "Dr. & Mrs." (yeah yeah I know) as an option value via REST API (using Civi 4.5b1).  Civi drops everything after the ampersand.  I tried URL encoding my inserted value, but that didn't work either - I'm using the Kettle CiviCRM step, the return value is below.  Does anyone have any insight as to have to get ampersands in strings in via REST API?


{"is_error":0,"undefined_fields":["is_active","label","option_group_id","name"],"version":3,"count":1,"id":800,"values":{"800":{"id":"800","option_group_id":"6","label":"Dr. ","value":"33","name":"Dr.  ","grouping":"","filter":"","is_default":"","weight":"33","description":"","is_optgroup":"","is_reserved":"","is_active":"1","component_id":"","domain_id":"","visibility_id":""}}}
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

elcongrio

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 3.6.1
  • CMS version: Wordpress
  • MySQL version: 5.3
  • PHP version: 5.3.3
Re: Inserting ampersands via REST API
August 12, 2014, 07:29:41 am
Try unicode
\u0026

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Inserting ampersands via REST API
August 12, 2014, 07:33:02 am
Thanks, I'll try that!
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Inserting ampersands via REST API

This forum was archived on 2017-11-26.