This module uses CDATA for all tags' values. In fact, they are completely unnecessary except for highly unusual circumstances. Please see http://en.wikipedia.org/wiki/CDATA#CDATA_sections_in_XML for an explanation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Aren Cambre’s picture

Status: Active » Needs review
FileSize
892 bytes

Patch attached.

Aren Cambre’s picture

This also appears to fix #494846: XML export pads all values with spaces. I don't know why!

Aren Cambre’s picture

FileSize
936 bytes

Mistake in original patch caused incorrect entity references. Fixed version attached.

neclimdul’s picture

Status: Needs review » Fixed

Committed a modified version of this with the logic in the preprocess function. Thanks.

Status: Fixed » Closed (fixed)

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

agalitsyn’s picture

Version: 6.x-1.0-beta2 » 6.x-1.1
Status: Closed (fixed) » Needs review
FileSize
2.46 KB

CDATA can be needed for specific fields.

So I use a standart field option called "Element wrapper type" to add CDATA wrapper. Views have variable "views_field_rewrite_elements" which can be overriden with yours additional wrappers.

I add cdata using drush

drush eval "variable_set('views_field_rewrite_elements', array('' => t('- Use default -'), '0' => t('- None -'), 'div' => t('DIV'), 'span' => t('SPAN'), 'h1' => t('H1'), 'h2' => t('H2'), 'h3' => t('H3'), 'h4' => t('H4'), 'h5' => t('H5'), 'h6' => t('H6'), 'p' => t('P'), 'strong' => t('STRONG'), 'em' => t('EM'), 'cdata' => t('CDATA')));"

And write come code to support this wrapper. (see patch)

neclimdul’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)