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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Alphanumeric custom fields > becomes >
Pages: [1]

Author Topic: Alphanumeric custom fields > becomes >  (Read 1703 times)

ehanuise

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 2
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.49-3
  • PHP version: 5.3.3-7+squeeze3
Alphanumeric custom fields > becomes >
August 01, 2012, 02:32:40 am
Hi.
We've set up an alphanumeric custom field, to enter a contact's fuction.
For translators, we note the source/target languages, example 'translator en > fr'
This displays OK, but when we edit the contact info, it becomes 'translator en > fr'

To me, computer literate, it's no bg deal : i understand the > was turned to an html character entity and stored as html entity in the DB.
I' however a bit worried that the > could appear here or there in an export or printout of the data.

But to our users, it's "hey the system has garbled my entry, do something!", and it's perceived as a bug.

So maybe it's be better to store the data as entered in the DB and do the htmlentities stuff on display/printout only ?
I guess there are some security issues underlying ?

Anyways, I'd like to know more about this and why it is so :)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Alphanumeric custom fields > becomes >
August 01, 2012, 10:28:33 am

Yes, this is to avoid script attacks et al and is done when writing to the DB

At some point we should switch to doing this on output rather than on input, but thats a longer more involved project

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Alphanumeric custom fields > becomes >

This forum was archived on 2017-11-26.