Using the raw_xml output option results in invalid xml code - there's a typo in the code
<?php
$output = str_replace('<', '<', $output); //encode left angle bracket
$output = str_replace('>', '&rt;', $output); //encode right angle bracket
?>
should read
<?php
$output = str_replace('<', '<', $output); //encode less than
$output = str_replace('>', '>', $output); //encode greater than
?>
There's similar code in the other views_datasource modules and this also needs fixing.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 286715_invalid_xml.patch | 2.57 KB | ksenzee |
Comments
Comment #1
ksenzee@kehan - Thanks for tracking this down. It saved me a bunch of time.
Here's a patch rolled against 5.x-1.0-alpha2 that fixes this bug in all the views_datasource modules.
Comment #2
allisterbeharry commentedThanks. Will be fixed in the next release.
Comment #3
dalinConfirmed that the patch works and is an appropriate fix.
Comment #4
dalinComment #5
volocuga commentedAnother typo:
Views_xml module (may be not only here):
Line 215
$output = str_replace("'", '&pos;', $output); //encode apostropheShould be
$output = str_replace("'", ''', $output); //encode apostropheComment #6
allisterbeharry commentedFixed in ALPHA-3
http://drupalcode.org/viewvc/drupal/contributions/modules/views_datasour...